CmdID / PowerShell / Cmdlets / Get
Get-OSLicenseInfo
Gets Windows operating system licensing information. Windows Server PowerShell reference
From the Windows Server PowerShell reference 5 parameters Its page in the reference
Parameters
-ActivationIDSpecifies the activation ID of the software licensing product that the cmdlet returns.-AllReturns every software licensing product whose ApplicationID and Name properties contain values.-AsJobRuns the command as a background job when you invoke it through an implicit-remoting wrapper.-TokenBasedCertificatesReturns token-based activation certificate information from the local software licensing service, including the issued certificate thumbprint list, grant number, ILID, and ILvID.-TokenBasedLicensesReturns installed token-based activation licenses.