I would like to access remotely to the registry of a Windows machine to see some keys under "SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform" with a Powershell script

I already tried to open a PSSession but it doesn't work. Is any other solution to do this ?

closed as off-topic by Greg Askew, Ward, mdpc, MadHatter, kasperd Nov 10 '15 at 12:10

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    I already tried to open a PSSession but it doesn't work. The error you get would be helpful. Also a quick Google search for "powershell remote registry" turns up at least 2-3 other possible solutions that don't involve PSSession. – GregL Nov 2 '15 at 13:14
  • Powershell really is not the best tool to work a remote registry. Assuming the Windows firewall is off, you should be able to connect to another machine through Windows itself. Is this a workstation or server OS? – Jonas Lear Nov 2 '15 at 17:49
$Computer = "RemoteComputerName"

$Reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $Computer)
$RegKey= $Reg.OpenSubKey("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SoftwareProtectionPlatform")
$RegValue = $RegKey.GetValue("UserOperations")

Make sure that RemoteRegistry Service is Enabled and Started on the remote machine, to change the registry hive, use one of this:


Not the answer you're looking for? Browse other questions tagged or ask your own question.