
Activating Windows
Activates Windows on the computer name you specify.
1 2 3 4 5 6 7 8 9 10 |
'Here, computer is the computer name to activate. Set objWMI = GetObject("winmgmts:{" & _ "impersonationLevel=impersonate}!" & _ computer & "rootcimv2") Set objWPA = objWMI.ExecQuery(_ "Select * from " & _ "Win32_WindowsProductActivation") For Each PA in objWPA PA.ActivateOnline() Next |