question

VikasJagtapBSL-2142 avatar image
0 Votes"
VikasJagtapBSL-2142 asked PeterDitlevsen-1079 commented

Powershell script to instsall ESU on windows server 2008

Hello
Need powershell script to install ESU product key and activation ID for windows server 2008. Currently we following below manual process and it works successfully but the same if we apply in powershell it giving product key invalid error

1) cscript slmgr.vbs /dlv - To check the ESU status
2) slmgr.vbs /ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx - Installtion of product key
3) cscript slmgr.vbs /ato - For activating activation ID.

98864-image.png


windows-server
image.png (65.1 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I used this PS to install and activate our ESU license key on all our 2008 servers.

These are the three scriptblocks you can use in the script

cscript C:\Windows\System32\slmgr.vbs /dlv
cscript C:\Windows\System32\slmgr.vbs /ipk <License key>
cscript C:\Windows\System32\slmgr.vbs /ato <Activation ID>


$a=Get-ADComputer -Filter {operatingsystem -like "2008"} -Properties *

foreach($server in $a){

switch -wildcard ($server.OperatingSystem){
"Windows Server 2008 R2 *" { Invoke-Command -ComputerName $server.DNSHostName -ScriptBlock { cscript C:\Windows\System32\slmgr.vbs /dlv }
}
}PS: I found that the 0xC004F050 error pops up if you don´t have the server patched with the acquired patches!
}

0 Votes 0 ·
DSPatrick avatar image
0 Votes"
DSPatrick answered

Just checking if there's any progress or updates?

--please don't forget to Accept as answer if the reply is helpful--




5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DSPatrick avatar image
0 Votes"
DSPatrick answered

Note: If you see the Error:0xC004F050 while trying to install the product key on Windows Server 2008 SP2, your device may require an additional reboot.

https://techcommunity.microsoft.com/t5/windows-it-pro-blog/obtaining-extended-security-updates-for-eligible-windows-devices/ba-p/1167091

--please don't forget to Accept as answer if the reply is helpful--





5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

VikasJagtapBSL-2142 avatar image
0 Votes"
VikasJagtapBSL-2142 answered

Thanks for prompt reply
We tried VAMT but when we going to add key again same issue it saying product key invalid

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

DSPatrick avatar image
0 Votes"
DSPatrick answered VikasJagtapBSL-2142 commented

Did you read the comment?
Note: If you see the Error:0xC004F050 while trying to install the product key on Windows Server 2008 SP2, your device may require an additional reboot.

--please don't forget to Accept as answer if the reply is helpful--






· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

OK i will try right now

0 Votes 0 ·

As i informed earlier if we install the same manually its not giving any error its install smoothly.

0 Votes 0 ·
DSPatrick avatar image
0 Votes"
DSPatrick answered

There could be some other yet unknown glitch which you can report here.
https://windowsserver.uservoice.com/forums/304618-installation-and-patching?category_id=141234

--please don't forget to Accept as answer if the reply is helpful--


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

VickyWang-MFST avatar image
0 Votes"
VickyWang-MFST answered

Hi,

Thank you for posting in our forum.

According to my knowledge and inquiries, there should be no difference between running commands in scripts and manually

If the information provided by MVP is not helpful, you can ask for help in the link below

reference: https://support.microsoft.com/en-in/hub/4343728/support-for-business

Hope this information can help you

Best wishes

Vicky

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.