scripting

SMS/SCCM & Batch Files and Scripting

Windows Activation Scripting

Activate Windows Offline


Uses the offline method to activate Windows. Requires a valid activation number

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colWindowsProducts = objWMIService.ExecQuery _
    ("Select * from Win32_WindowsProductActivation")

For Each objWindowsProduct in colWindowsProducts
    objWindowsProduct.ActivateOffline("1234-1234")
Next
	

Activate Windows Online


Subscribe to RSS - scripting