Hi,
I'm currently struggling trying to figure out how to use the -query
parameter with gwmi for namespaces other than "root\cimv2".
Eg.
It's simple enough to do something like:-
ExitCode : 0
>$query = "SELECT * from Win32_Service WHERE name='W32Time'"
>gwmi -query $query
Name : W32Time
ProcessId : 1688
StartMode : Auto
State : Running
Status : OK
but.. what if I want to get data out of "root\securitycenter" and the
"antivirusproduct" class?
I looked on MSDN for WQL but couldn't see any (to me) clear example of
what the syntax should be for such a gwmi statement.
Would appreciate any examples showing how best to construct the WQL to
reference the namespace and class.
Thanks,
Stuart


