Skip to content

Instantly share code, notes, and snippets.

@jmconway
Created May 11, 2021 18:15
Show Gist options
  • Save jmconway/86a28734ad915f44fa0700a97db05b2a to your computer and use it in GitHub Desktop.
Save jmconway/86a28734ad915f44fa0700a97db05b2a to your computer and use it in GitHub Desktop.
Quick WMI calls to set an MAK in Windows and activate at the end of WDS/MDT deployments.
$key = ''
$MAK = Get-WmiObject -Query "Select * from SoftwareLicensingService"
$MAK.InstallProductKey($key)
$MAK.RefreshLicenseStatus()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment