Question

I am trying to get a registry value from a remote machine but everything I have tried did not work.

Both machines are running windows 7 x64, they are on the same domain, firewall off, powershell 4.0

when I run :

$reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey("LocalMachine", "APPS-EUAUTO1")
$key = $reg.OpenSubkey('SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion')
Write-Host $key.GetValue('InstallDate')

i get

Exception calling "OpenRemoteBaseKey" with "2" argument(s): "The network path was not found.
"
At C:\Users\User\Desktop\test.ps1:1 char:1
+ $reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey("LocalMachine", "APPS-EU ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : IOException

I know nothing of .Net and I have only played with PowerShell for the last month. I have also tried the module PSRemoteRegistry and when I am using Get-RegValue I get the same error message (I think it is using the same thing)

Was it helpful?

Solution

Assuming you can ping APPS-EUAUTO1(and it resolves to correct IP) and firewall is off.. make sure Remote Registry service is running on your APPS-EUAUTO1

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top