Knowledge Base

Search Our Knowledge Base

Find your answers by searching below.

How does smartImager use the Windows 10 key that is baked into the BIOS of the computer when I am imaging?

Print article Email to friend
0.00

Create a PowerShell Script file called InjectKey.ps1 with the below contents:

 

$WKey=(Get-WmiObject -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey

c:windowssystem32cscript.exe //nologo c:windowssystem32slmgr.vbs /ipk $WKey

c:windowssystem32cscript.exe //nologo c:windowssystem32slmgr.vbs /ato

 

The idea here is to force the workstation PC to investigate the BIOS, grab the Windows Key and then register it with the slmgr.vbs script that is in the System32 directory on every copy of Windows.  That is what the InjectKey.PS1 file does.  But we need to call that as an application during the imaging process.

 

So, here is how we do that:

 

  1. Create a folder on your server named "WindowsKey" in your "C:Program FilesSirckssmartImagerRepositoriesApplications" directory.
  2. Place the "InjectKey.PS1" file into the ""C:Program FilesSirckssmartImagerRepositoriesApplicationsWindowsKey" folder you just made.
  3. In the smartImager console, create a new application under Components -> Applications

•Name = Inject Windows Key

•Folder Path = C:Program FilesSirckssmartImagerRepositoriesApplicationsWindowsKey

Hint: Click the magnifying glass to browse to this location

•Install Command = powershell.exe -ExecutionPolicy unrestricted -file .InjectKey.PS1

Hint: Click the magnifying glass to browse to the InjectKey.PS1 file for smartImager to write the install for you

•Install Type = Install After Imaging - After Domain Join.  You can set the install type to "Install During Imaging - After Sysprep" if needed, but it is better to set it after the imaging process is complete.

 

  1. Click Save to save your "Inject Windows Key" application.
  2. Add the Inject Windows Key application to an Application Pack
  3. Publish your changes.

How does smartImager use the Windows 10 key that is baked into the BIOS of the computer when I am imaging?

Create a PowerShell Script file called InjectKey.ps1 with the below contents:

 

$WKey=(Get-WmiObject -query 'select * from SoftwareLicensingService').OA3xOriginalProductKey

c:windowssystem32cscript.exe //nologo c:windowssystem32slmgr.vbs /ipk $WKey

c:windowssystem32cscript.exe //nologo c:windowssystem32slmgr.vbs /ato

 

The idea here is to force the workstation PC to investigate the BIOS, grab the Windows Key and then register it with the slmgr.vbs script that is in the System32 directory on every copy of Windows.  That is what the InjectKey.PS1 file does.  But we need to call that as an application during the imaging process.

 

So, here is how we do that:

 

  1. Create a folder on your server named "WindowsKey" in your "C:Program FilesSirckssmartImagerRepositoriesApplications" directory.
  2. Place the "InjectKey.PS1" file into the ""C:Program FilesSirckssmartImagerRepositoriesApplicationsWindowsKey" folder you just made.
  3. In the smartImager console, create a new application under Components -> Applications

•Name = Inject Windows Key

•Folder Path = C:Program FilesSirckssmartImagerRepositoriesApplicationsWindowsKey

Hint: Click the magnifying glass to browse to this location

•Install Command = powershell.exe -ExecutionPolicy unrestricted -file .InjectKey.PS1

Hint: Click the magnifying glass to browse to the InjectKey.PS1 file for smartImager to write the install for you

•Install Type = Install After Imaging - After Domain Join.  You can set the install type to "Install During Imaging - After Sysprep" if needed, but it is better to set it after the imaging process is complete.

 

  1. Click Save to save your "Inject Windows Key" application.
  2. Add the Inject Windows Key application to an Application Pack
  3. Publish your changes.