I want to get a message if Windows not activated
I create gpo that run message on logon
If i run this filter via wmi filter
Get-wmiobject -query 'select licensestatus from softwarelicensingproduct where LicenseStatus like 1'
I get the message.
But if run this filter
Get-wmiobject -query 'select licensestatus from softwarelicensingproduct where LicenseStatus like 0'
I get message on all the computers - activate and not activate
Is it possible to check all computers where the where LicenseStatus like 1 does not work?
I try to write this with not like
Get-wmiobject -query 'select licensestatus from softwarelicensingproduct where not LicenseStatus like 1'
It is not work. its work like LicenseStatus like 0