Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Powershell for remote computer for HKCU

Status
Not open for further replies.

molerrrr

Programmer
Jan 27, 2011
12
US
All,
I have beat my head on how I can use powershell to check remote HKCU registry keys. I have found that as long as I RDP to all of the boxes then I can run a powershell script to check all HKCU keys. I understand the HKCU is unique to the user but is there anyway I can check the HKCU keys without having to log into all? Below is my script.


$Servers=Get-Content Computers.txt
foreach($server in $Servers){
$reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey("CurrentUser", $server)
$key = $reg.OpenSubkey('Software\Microsoft\Internet Explorer\Main')
$value = $key.GetValue("Start Page")
if (($key.GetValue("Start Page")) -eq "about:blank"){
write-host $value
write-host "DTBI001-IE11 - passed"
}

else {
write-host "DTBI001-IE11 - FAILED"
}
}
 
This would be a better forum to post this question in: forum1619
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top