Looking to see if it would be possible to create a procedure that would allow us to find out of a desktop/server is properly licensed or is deactivated. Has anyone got this to successfully work?
This is what I use for the servers:
I think works perfectly.
The magic it is to execute on powershell this script:
((cscript c:\windows\system32\slmgr.vbs /dlv | find 'Timebased activation expiration:')-split') (',-1,'simplematch'-Split'day',-1,'SimpleMatch' | select -Skip 1 -First 1)
It will give you, in case the license it is temporary, the number of days left for the expiration.
Thank you Miguel! Will definitely try this out.