
SCmdViewLicense = "\\\lansweeper$\PsExec.exe \\" & strComputer & " cscript.exe ""C:\windows\system32\slmgr. SCmdActivate = "\\\lansweeper$\PSTools\PsExec.exe \\" & strComputer & " cscript.exe ""C:\windows\system32\slmgr.vbs"" /ato" SCmdInstall = "\\\lansweeper$\PSTools\PsExec.exe \\" & strComputer & " cscript.exe ""C:\windows\system32\slmgr.vbs"" /ipk " & sProductKey SCmdUninstall = "\\\lansweeper$\PSTools\PsExec.exe \\" & strComputer & " cscript.exe ""C:\windows\system32\slmgr.vbs"" /upk" 'Function for activating windows using PsExec and slmgr.vbs 'Tests to see if valid product key format SProductKey = Replace(sProductKey, " ", "")

SProductKey = InputBox("Please enter the Product Key for this computer with the -'s: ", "New Product Key", "") Set objRegExp = CreateObject("Vbscript.RegExp") slmgr.vbs /rearm added the retail license checked it was in the system with slmgr.vbs /dvi - it was rebooted re-enabled the network now both licenses work fine so this was not a problem with the license but with something in windows. Set objScript = CreateObject("WScript.Shell")
#Slmgr rearm windows 10 update
To buy a digital license online, select Start > Settings > Update & Security > Activation, and then select Go to Microsoft Store.
#Slmgr rearm windows 10 windows 10
In this case, you’ll need to provide a valid 25-character Windows 10 product key or purchase a Windows 10 digital license to activate. 'Pass computer name from Lansweeper to script This is the first time Windows 10 has been installed on this PC. You will need the following in your Lansweeper server's action path:ĪctivateWindows.vbs (create from the code below) In short, this script does the following: uninstalls current key, installs new key that you typed in, activates online, and then displays the licensing status for that computer. This will even work for MAK keys as we use it activate our servers with the correct MAK after deployments. Reason: slmgr.vbs file might have any other extension. Now use command like this C:\windows\system32> slmgr -rearm. type cd windows\system32 and press enter.

#Slmgr rearm windows 10 how to
For OEM computers that shipped with Win 8 please visit this site to find out how to record the OEM key since I know people are going to ask. Just try slmgr / rearm instead slmgr -rearm. We utilize "Comments" page to record the OEM product key as part of our SOP when we acquire new computers to make a record of the OEM key and to easily copy and paste if we need to activate after an new image is applied. We have a mixed Win 7/8.1 environment so this was the need for using PsExec since a Win 8 slmgr.vbs script will not activate a Win 7 machine and vise versa. I thought I share a great custom action that uses a Vbscript that I created to aid in our OEM activation process if one of my tech's forget to activate Windows after using MDT to image a machine as we use OEM versions of Windows Pro. If you don’t have any days left on your evaluation and the rearm count isn’t 0, run the command below to extend the trial and then restart the server.
