

» PowerShell for Windows » Reading Remote RegistryKeys inside a Remote Session. The original reason for the existence of this site was our set of functions for PowerShell which. I'm also not clear on exactly where to specify which users are allowed to access the registry remotely.

I'd like to be able to supply a set of credentials to use for the remote registry access, but I can find no documentation anywhere of a way to do this.

At 32ErrorStatic(Int32 errorCode, String str) at (RegistryHive hKey, String machineName) It seems pretty clear that this is because the user I'm running the powershell script as doesn't have the appropriate credentials to access the remote registry. I'm attempting to use powershell to access a remote registry like so: $reg = ::OpenRemoteBaseKey('LocalMachine', $server) $key = $reg.OpenSubkey($subkeyPath) Depending on some factors that I'm not yet able to determine I either get Exception calling 'OpenSubKey' with '1' argument(s): 'Requested registry access is not allowed.' Or System.UnauthorizedAccessException: Attempted to perform an unauthorized operation.
