Nicola Cossu
Nicola Cossu

Reputation: 56357

detect internet explorer version on remote machine

I'm trying to detect internet explorer version on remote machine. After some search with google I've wrote this. I'm testing it on local machine

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

but it returns me a lot of errors.

 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

I hope someone can give me some advice. Thanks. edit. I've found this link http://archive.msdn.microsoft.com/PSRemoteRegistry

Is this module absolutely necessary to query registry on remote machines?

Upvotes: 1

Views: 9102

Answers (3)

user3826014
user3826014

Reputation: 11

Sounds simple but.. Go to remote PC through UNC path using explorer. Navigate to iexplore, right click, properties, details tab. IE info is there :)

Upvotes: 1

Torbj&#246;rn Bergstedt
Torbj&#246;rn Bergstedt

Reputation: 3429

You know you can browse the registry just like files with Powershell?

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

Or maybe:

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

You may have to use the -credentials parameter for any of those commands to get access. And have WinRM set-up on any of the machines you want to access.

Upvotes: 2

ravikanth
ravikanth

Reputation: 25810

You can query remote registry without that module. PSRemoteRegistry module only makes it easy. However, the requirement is to have remote registry service enabled and running on the remote machine. For an example, without the PSremoteRegistry module, check my blog post: http://www.ravichaganti.com/blog/?p=1920

Also, try at an elevated PowerShell console. You need admin rights to query remote registry. This is what I found on my system.

Upvotes: 3

Related Questions