I run a set of tools on Windows machines, both domain-joined and stand-alone. One of the tools involves offline activation using a CAC. I would like to write into my script a switch that will bypass that tool if the target machine is already activated through AD, and run it if not.
Is there a reliable place in WMI that will allow me to do this? Google AI search gave me this:
Get-WmiObject -Class SoftwareLicensingService | Select-Object -ExpandProperty ActivationMethod
but there is apparently no "ActivationMethod" property in SoftwareLicensingService.