So in case you want to check if Servers/Clients are licenced (Operatingsystem), you can do that via Powershell. Also you later you can use this as a Configuration Item in SCCM and deploy that in a Configuration Baseline to monitor what machines are licensed or not. This is tested on Server 2008 R2 and up.
$InstalledLicense = Get-WmiObject -Query "Select * from SoftwareLicensingProduct Where PartialProductKey IS NOT NULL AND ApplicationID = '55c92734-d682-4d71-983e-d6ec3f16059f'" Switch ($InstalledLicense.LicenseStatus) { 0 {"Unlicensed"} 1 {"Licensed"} 2 {"Out-of-Box Grace Period"} 3 {"Out-of-Tolerance Grace Period"} 4 {"Non-Genuine Grace Period"} 5 {"Notification"} 6 {"ExtendedGrace"} }