I am trying to retrive remotly the HKCU\Software\Meeting
Value =S Meeting
I did use the below script but it's working only for HKLM :
#===========================================
$SearchValue = "WAX"
$RegPath = "SOFTWARE\Parameters"
$PCList = gc "c:\Temp\listPC.txt"
$output = "C:\temp\List2_Output.txt"
"Computer,Results" | out-file $output
ForEach ($Computername in $PCList)
{
if (Test-Connection $computername -quiet -count 1)
{
$Values = Get-RegValue -ComputerName $Computername -Hive LocalMachine -Key $RegPath -Value Site
if ($Values -match $SearchValue)
{
write-host $Computername "- Value found"
"$Computername,Value Exists" | out-file -append $output
}
else{
write-host $Computername "- Value not found"
"$Computername,Does not exist" | out-file -append $output
}
} #End Ping
else{
write-host $Computername "- Offline"
"$Computername,Offline" | out-file -append $output
}
} #End ForEach
#======================================
did try the following code script but it's not working :
[Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey([Microsoft.Win32.RegistryHive]::CurrentUser,'Z420')
Both the name and property are empty.