I'm trying to collect some registry values from remote server using StdRegProv class:
Invoke-Command -ComputerName $ComputerHost -Credential $cred -ScriptBlock { Get-WmiObject -List -Namespace "root\default" | Where-Object { $_.Name -eq "StdRegProv" } }
But it doesnt return methods for these class in output:
NameSpace: ROOT\default
Name Methods Properties PSComputerName
---- ------- ---------- --------------
StdRegProv
If i execute the command from ScriptBlock in machine locally, all works fine and output looks like these:
NameSpace: ROOT\default
Name Methods Properties
---- ------- ----------
StdRegProv {CreateKey, Delet... {}
Some of other commands, like Get-Service, works ok and i can see the output. What is the problem with these one? Remote machine is: Windows Server 2003 with installed .Net 3.5.1 and PowerShell 2.0
I thought, that StdRegProv class doesnt work in 2003 server, but it works ok locally