(
if
(
(
string value of select "LicenseStatus from SoftwareLicensingProduct WHERE (PartialProductKey is not null) and (Name LIKE 'Windows(R)%25' or Name LIKE 'Windows Server(R)%25') and (Name LIKE '%25ESU-Year1%25')" of wmi
)
as string contains "1"
)
then "Licensed" else "Not Licensed"
)
| "No ESU License"
(if ((string value of select "LicenseStatus from SoftwareLicensingProduct WHERE (PartialProductKey is not null) and (Name LIKE 'Windows(R)%25' or Name LIKE 'Windows Server(R)%25') and (Name LIKE '%25ESU-Year1%25')" of wmi) as string contains "1") then "Licensed" else "Not Licensed" ) | "No ESU License"