I'm trying to make a script for checking license in my computer. I want to get the output like this:
Name: Windows(R), Professional edition
> PartialProductKey: 3V66T
> LicenseStatus: 1
Name: Office 16, Office16ProPlusVL_KMS_Client edition
> PartialProductKey: WFG99
> LicenseStatus: 1
Here is the code to check for Name:
for /f "tokens=2 delims==" %%b in ('"wmic path SoftwareLicensingProduct where (PartialProductKey is not null) get Name /value"') do (echo Name: %%b)
For PartialProductKey:
for /f "tokens=2 delims==" %%b in ('"wmic path SoftwareLicensingProduct where (PartialProductKey is not null) get PartialProductKey /value"') do (echo PartialProductKey: %%b)
and for LicenseStatus:
for /f "tokens=2 delims==" %%b in ('"wmic path SoftwareLicensingProduct where (PartialProductKey is not null) get LicenseStatus /value"') do (echo LicenseStatus: %%b)
But how can I show the PartialProductKey, LicenseStatus below each Name? Thanks!