Hi,
I have a Project to retrieve License Status for all Windows version running, WinXP, Win7, Win8, Win 2003, Win 2008, Win 2008R2 and Windows 2012.
I am using strawgate’s suggestion from this link but it applies only to Win7, Win8 and a few Win 2012
(select “LicenseStatus from SoftwareLicensingProduct WHERE (PartialProductKey is not null) and (Name like ‘Windows(R)%25’)” of wmi) as string contains “1”