Is there a way to convert this:
GWMI -query "Select PartialProductKey,Description from SoftwareLicensingProduct where productkeyid is not null" -Computername $HostName
to an accelerator?
I have tried:
[wmi]'\\$HostName\root\cimv2:SoftwareLicensingService.RemainingWindowsReArmCount="%"'
[wmi]'\\$HostName\root\cimv2:SoftwareLicensingService.RemainingWindowsReArmCount="*"'
[wmi]'\\$HostName\root\cimv2:SoftwareLicensingService.RemainingWindowsReArmCount'
[wmi]'root\cimv2:SoftwareLicensingService.RemainingWindowsReArmCount'
[wmi]'SoftwareLicensingService.RemainingWindowsReArmCount="1"'
I can find lots of examples that work and seem to make sense, but when I try to apply them they don't work.
This is purely academic to me. I have already made the script work with GWMI, but I cannot figure out why I cannot get the same thing from the [wmi] accelerator.