noobsccm
New Member
- Messages
- 4
- Reaction score
- 0
- Points
- 1
Hi,
We are using SCCM/MECM 2103 in our organization. I am trying to run a powershell script through task sequence to activate windows 10 using product key. The scripts I used are as follows :
1.
=================================================================================
$productkey=(Get-CimInstance -query ‘select * from SoftwareLicensingService’).OA3xOriginalProductKey
slmgr -ipk $productkey
===========================================================================
2.
===========================================================================
$Productkey =(Get-WmiObject -Class SoftwareLicensingService).OA3xOriginalProductkey
cscript /b C:\Windows\System32\slmgr.vbs -ipk $Productkey
cscript /b C:\Windows\System32\slmgr.vbs -ato
===========================================================================
I put this step after 'Setup Windows and Configuration Manager' but this scripts is not activating the windows. However If I use this script locally on the machine it worked. Please note we do not use KMS server or MAK to activate windows. We use E5 license which is not activating the windows either and is totally a separate issue.
Now, please help me to troubleshoot how can I activate windows through sccm task sequence? What I am missing here?
Thanks in Advance
We are using SCCM/MECM 2103 in our organization. I am trying to run a powershell script through task sequence to activate windows 10 using product key. The scripts I used are as follows :
1.
=================================================================================
$productkey=(Get-CimInstance -query ‘select * from SoftwareLicensingService’).OA3xOriginalProductKey
slmgr -ipk $productkey
===========================================================================
2.
===========================================================================
$Productkey =(Get-WmiObject -Class SoftwareLicensingService).OA3xOriginalProductkey
cscript /b C:\Windows\System32\slmgr.vbs -ipk $Productkey
cscript /b C:\Windows\System32\slmgr.vbs -ato
===========================================================================
I put this step after 'Setup Windows and Configuration Manager' but this scripts is not activating the windows. However If I use this script locally on the machine it worked. Please note we do not use KMS server or MAK to activate windows. We use E5 license which is not activating the windows either and is totally a separate issue.
Now, please help me to troubleshoot how can I activate windows through sccm task sequence? What I am missing here?
Thanks in Advance

