tags:

views:

241

answers:

1

I am running PowerShell 1.0 under Windows XP, attempting to connect to machines running XP, Vista, and Server 2003 with the following command:

gwmi -cl Win32_OperatingSystem -co COMPUTER -n "root\CIMV2" -cr DOMAIN\ADMIN

This returns an error. "Exception retrieving members: Access is denied.".

gwmi -cl Win32_OperatingSystem -co COMPUTER -cr DOMAIN\ADMIN

This works.

Firewall and DCOM services are configured properly, otherwise neither command would not run.

I have tried the first command with credentials set to COMPUTER's local administrator, same error.

I can run the first command against localhost, no error.

$q = "Select * from Win32_OperatingSystem"
$y = [WmiSearcher] $q
$y.Scope.Path = "\\COMPUTER\root\cimv2"
$y.Scope.Options.Authentication = 6
$os = $y.Get()

also fails. The administrator group on COMPUTER has the appropriate permissions according to this Microsoft KB article.

We recently rolled out a WSUS server, pushing out a ton of miscellaneous Windows Updates to our systems. Are any updates known to break WMI like this?

A: 

I wonder if the remote side is requiring an encrypted connection for this particular namespace.

See if this approach works for you:

$q = "Select * from Win32_OperatingSystem"
$y = [WmiSearcher] $q
$y.Scope.Path = "\\<remote_computer_name>\root\cimv2"
$y.Scope.Options.Authentication = 6
$os = $y.Get()

Here is a link related to this issue.

Keith Hill