Powershell script to install and activate ESU for WIndows server 2008

vikas jagtap 86 Reputation points
2021-05-17T13:30:54.85+00:00

Hello
Need powershell script to install ESU product key and activation ID for windows server 2008. Currently we following below manual process

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.

Windows for business Windows Server User experience PowerShell
0 comments No comments
{count} votes

Accepted answer
  1. Anonymous
    2021-05-18T07:16:32.387+00:00

    Hi,

    You can try something like below

    Get-Content -Path C:\ESUScript\computers.txt | ForEach-Object{  
        cscript slmgr.vbs $_ /ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx   
        cscript slmgr.vbs $_ /ato   
    }  
    

    Best Regards,
    Ian Xue

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2021-05-18T02:16:50.02+00:00

    Hi,

    You can simply add these lines to your PowerShell script file.

    cscript slmgr.vbs /dlv   
    slmgr.vbs /ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx   
    cscript slmgr.vbs /ato  
    

    Best Regards,
    Ian Xue

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.