【问题标题】:detect internet explorer version on remote machine检测远程机器上的 Internet Explorer 版本
【发布时间】:2011-03-26 11:31:37
【问题描述】:

我正在尝试检测远程计算机上的 Internet Explorer 版本。在用谷歌搜索后,我写了这个。我正在本地机器上测试它

$pc = "."    
$key = "SOFTWARE\Microsoft\Internet Explorer"                                                                        
$reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $pc)         
$regKey = $reg.OpenSubKey($key)           
$regkey.GetValue("Version")

但它会给我带来很多错误。

 Eccezione durante la chiamata di "OpenRemoteBaseKey" con "2" argomento/i: "Impossibile trovare il percorso di rete.
    "
    In riga:3 car:56
    + $reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey <<<< ('LocalMachine', $pc)         
        + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
        + FullyQualifiedErrorId : DotNetMethodException


Impossibile chiamare un metodo su un'espressione con valore null.
In riga:4 car:26
+ $regKey = $reg.OpenSubKey <<<< ($key)           
    + CategoryInfo          : InvalidOperation: (OpenSubKey:String) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

Impossibile chiamare un metodo su un'espressione con valore null.
In riga:5 car:17
+ $regkey.GetValue <<<< ("Version")
    + CategoryInfo          : InvalidOperation: (GetValue:String) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull

希望有人能给我一些建议。谢谢。 编辑。我找到了这个链接 http://archive.msdn.microsoft.com/PSRemoteRegistry

这个模块对于查询远程机器上的注册表是绝对必要的吗?

【问题讨论】:

  • 嗨。错误消息是意大利语,但如果它可以帮助我尝试翻译它。我会编辑我的帖子。

标签: powershell remote-access


【解决方案1】:

您可以在没有该模块的情况下查询远程注册表。 PSRemoteRegistry 模块只是让它变得简单。但是,要求是启用远程注册表服务并在远程计算机上运行。例如,没有 PSremoteRegistry 模块,请查看我的博文:http://www.ravichaganti.com/blog/?p=1920

另外,请在提升的 PowerShell 控制台上尝试。您需要管理员权限才能查询远程注册表。这是我在我的系统上找到的。

【讨论】:

  • 嗨。再次感谢您的回复。 :) 我已经解决了你的建议。按照此链接computerperformance.co.uk/windows7/… 的教程,我已经在我的电脑上启用了远程注册表,现在甚至我的脚本也运行良好。再次感谢。然后会启用远程注册表服务。我明白了:)
【解决方案2】:

您知道您可以像使用 Powershell 浏览文件一样浏览注册表吗?

PS> Enter-PSSession -Computername "computer"
PS[computer]> $reg = Get-Item ('HKLM:\Software\Microsoft\Internet Explorer\Version Vector')
PS[computer]> $reg.GetValue("IE")

或许:

PS> Invoke-Command -computername "computer" { $reg = Get-Item ('HKLM:\Software\Microsoft\Internet Explorer\Version Vector'); $reg.GetValue("IE") }

您可能必须对这些命令中的任何一个使用 -credentials 参数才能获得访问权限。并在您要访问的任何机器上安装 WinRM。

【讨论】:

    【解决方案3】:

    听起来很简单,但是.. 使用资源管理器通过 UNC 路径转到远程 PC。 导航到 iexplore, 右键单击,属性,详细信息选项卡。 IE信息在那里:)

    【讨论】:

      猜你喜欢
      • 2012-11-29
      • 1970-01-01
      • 2023-03-25
      • 2015-05-29
      • 2012-03-10
      • 1970-01-01
      • 2019-03-29
      • 2013-03-16
      • 1970-01-01
      相关资源
      最近更新 更多