search
Categories
Sponsors
VirtualMetric Hyper-V Monitoring, Hyper-V Reporting
Archive
Blogroll

Badges
MCSE
Community

Cozumpark Bilisim Portali
Getting Registry Values from Remote Machine via PowerShell
Posted in Windows Powershell | No Comment | 4,656 views | 04/02/2016 22:46

You can use [Microsoft.Win32.RegistryKey] to get remote registry values.

1
2
3
4
5
6
7
$ComputerName = "Server";
 
# Create Registry Connection
$RegistryConn = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey([Microsoft.Win32.RegistryHive]"LocalMachine", $ComputerName)
 
# Get Sub Key Names
$GetSubKeyNames = $RegistryConn.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\X\").GetSubKeyNames()

That will give you results.



Leave a Reply