header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
Read registry on remote computer
Last Post 05 Mar 2010 01:27 PM by PoSherLife. 1 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Terry2winUser is Offline
New Member
New Member
Posts:39
Avatar

--
04 Mar 2010 06:40 AM
    Hello everybody.

    I'm making a script to read certain information from the registry of a remote computer, such as when windows updates were last installed.

    PS> $registry = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey("LocalMachine","vistacomputer")
    PS> $les= $registry.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results\Install")
    PS> $les.getValue("LastSuccessTime")

    I'm running the script from my domain controller and "out" to the computer in the domain. My domain controller runs windows server 2008 r2. The script works when I run it against my exchange server which is the same operating system. However, when I run it against Windows Vista I cannot get it to work:

    Error message:

    Exception calling "OpenRemoteBaseKey" with "2" argument(s): "The network path was not found.


    When running the script locally on the Vista computer it works fine, so the problem has to be the connection between the two computers. I can ping the Vista computer from the domain controller.

    Thank you in advance.
    PoSherLifeUser is Offline
    Basic Member
    Basic Member
    Posts:364
    Avatar

    --
    05 Mar 2010 01:27 PM
    sounds like a firewall issue. is there a firewall installed on the vista computer?

    also, you may try it with WMI:

    $HKLM = 2147483650

    $reg = GWMI -list -namespace root\default -computername vistacomputer| where-object { $_.name -eq "StdRegProv" }
    $key = $reg.GetStringValue($HKLM,"Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results\Install","LastSuccessTime")
    When at first you don't succeed Step-Into

    http://theposherlife.blogspot.com
    http://www.jandctravels.com

    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer