Quantcast
Channel: Active questions tagged windows - Super User
Viewing all articles
Browse latest Browse all 9617

PowerShell script to determine whether "this" computer is activated through Active Directory

$
0
0

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.


Viewing all articles
Browse latest Browse all 9617

Trending Articles