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 16395 Admin Service: Registered, Version. 'Tests to see if valid product key format Remaining Windows rearm count: 0 Trusted time: 9:22:57 PM Windows Activation Technologies-> HrOffline: 0x00000000 HrOnline: 0xC004C532 HealthStatus: 0x0000000000000000 Event Time Stamp: 12:12:2015 17:25 ActiveX: Registered, Version. SProductKey = Replace(sProductKey, " ", "") SProductKey = InputBox("Please enter the Product Key for this computer with the -'s: ", "New Product Key", "") Set objRegExp = CreateObject("Vbscript.RegExp") Set objScript = CreateObject("WScript.Shell") Now to check the current license, time remaining, rearm count use the command slmgr -dlv. We need to reboot the system for the changes to take effect. 'Pass computer name from Lansweeper to script This post is meant for testers who use modern.ie to run cross browser tests.
SLMGR REARM WINDOWS 10 CODE
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.
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. 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.
SLMGR REARM WINDOWS 10 WINDOWS 7
Using Slmgr.vbs to manage a Windows 7 or Windows Server 2008 R2 system from the Windows Vista operating system is not supported. Because of WMI changes in Windows 7 and Windows Server 2008 R2, the Slmgr.vbs script is not intended to work across platforms. 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. Applies To: Windows 10, Windows 8.1, Windows Server 2012 R2. 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.