Forums on Intune, SCCM, and Windows 11

Welcome to the forums. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your topics and posts, as well as connect with other members through your own private inbox!

PENDING unable to run windows activation PowerShell script through task sequence

  • Thread starter Thread starter noobsccm
  • Start date Start date
  • Replies Replies 7
  • Views Views 5K

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
 
Does the crossed out name say "NT authority\Local System" or something like that?
In ay case, you now have something to troubleshoot.
Try it without the $productkey= section of text.
the crossed out name say ' ourdomainname\our local system account'
I already tried without $productkey
1658174833097.png
 
Why not specify the product key in the task sequence and activate the computer?.
Because I do not have the key hence I am using this '

$ProductKey = (Get-WMIObject -Class SoftwareLicensingService).OA3xOriginalProductKey
to get the key from BIOS
 
If you're imaging WIn10 systems for your org, I think it's a fair ask to get the product key from whoever the "keeper of the keys" is and just put it in the TS as Prajwal suggested.
 

Forum statistics

Threads
7,159
Messages
27,945
Members
18,241
Latest member
ljrb

Latest posts

Back
Top