No prob. With this ESU shenanigans, soon Windows 10 will also be affected. It's easy to filter out with the right WMIC command, but I don't know anything about PowerShell.
OMFG Powers**te is yes at times great --at some things-- but its such a pain in the rear when it throws up the stupidest of errors that you need a encylopedia to understand it all
Code: ESU Program ESU SKU (or Activation) ID Windows 7 SP1 (Client) Year 1 77db037b-95c3-48d7-a3ab-a9c6d41093e0 Year 2 0e00c25d-8795-4fb7-9572-3803d91b6880 Year 3 4220f546-f522-46df-8202-4d07afd26454 Windows Server 2008/R2 (Server) Year 1 553673ed-6ddf-419c-a153-b760283472fd Year 2 04fa0286-fa74-401e-bbe9-fbfbb158010d Year 3 16c08c85-0c8b-4009-9b2b-f1f7319e45f9 I found these on the net - so the esu (win7) have new SKU ID's....
in powershell prompt: Code: Get-CimInstance -ClassName SoftwareLicensingProduct | ? { $_.PartialProductKey -ne $null } Gives a lot of info, parsing is the issue i have with PShell, but if that does give the esu info in that (i not got any esu enabled pc's) then i may be able to find a way to parse it like WMIC would .....
Code: $SLP = Get-CimInstance SoftwareLicensingProduct -Filter 'Description LIKE "Windows%" AND LicenseStatus = 1' $SLP.Description -replace '.*(VOLUME_KMS|VOLUME_MAK|OEM_SLP|RETAIL|OEM_COA_NSLP|OEM_COA_SLP).*', '$1' Seems to be the PS equivelent to WIMIC
Way to high for me, I guess. It could even mention the Addon licenses in the reports (no need for it in the GUI, though).
pshell does go overboard on its results but most are a pain to parse, you have to fart about with select's and filter's from what i can gather, pretty much you have to hand hold it like a infant , tell it how to do x y z , unlike wmic give it a few bits of info and it parses easy enough. One reason why i try to avoid pshell, its good but the syntax takes some getting used to
As usual, MS' help texts on the command line are not very useful unless you have a profound understanding of the tools already. Powershell, I won't open that can of worms, for sure.
I only dabble with pshell when i have no alternative as its such a long winded experience.... Plus not all ps commands work on older pshell versions which is another royal pain too!
LicenseIsAddon does not work well for Win7 better use "LicenseDependsOn IS NULL" and "LicenseDependsOn IS NOT NULL" to exclude addons or only include addons + Get-CimInstance is ps 3.0+ Get-WmiObject should be used