Just as a warning before using this script, it is not the quickest script to run, and I would suggest only running the script once per week on a schedule. This requires a custom field with a ****text**** type, ****read onl****y permissions for technicians, and ****write only**** permissions for scripts ```powershell $LicenseInfo = Get-CimInstance SoftwareLicensingProduct -Filter "Name like 'Windows%'" | where { $_.PartialProductKey } | select Description, LicenseStatus Switch ($LicenseInfo.LicenseStatus) { 0 {$LicenseStatus = 'Unlicensed'; Break} 1 {$LicenseStatus = 'Licensed'; Break} 2 {$LicenseStatus = 'OOBGrace'; Break} 3 {$LicenseStatus = 'OOTGrace'; Break} 4 {$LicenseStatus = 'NonGenuineGrace'; Break} 5 {$LicenseStatus = 'Notification'; Break} 6 {$LicenseStatus = 'ExtendedGrace'; Break} } Ninja-Property-Set windowslicensestatus $LicenseStatus ``` --- [[Epistemic status|Colophon: Brewed]]