I've got a few server core database servers in my test lab and the ones where I could successfully use the gui to install SQL server use Microsoft Update for checking for updates. The servers that I had to install SQL using the command line only use Windows Update. Does anyone know how to switch a server core install to use Microsoft Update instead of Windows Update? I'd like to be able to update both Windows and SQL at the same time in the lab.

Thank you,

  • Using WSUS an option?
    – yagmoth555
    Feb 25, 2020 at 3:22

2 Answers 2


PowerShell oneliner inspired from VBS example in documentation https://docs.microsoft.com/en-us/windows/win32/wua_sdk/opt-in-to-microsoft-update

(New-Object -ComObject Microsoft.Update.ServiceManager).AddService2("7971f918-a847-4430-9279-4a52d1efe18d",7,"")
  • 1
    That line of PowerShell is a thing of beauty. I've been searching for this off and on for a couple months and never found the microsoft docs link you provided. Just tested it on a server 2019 core instance and it worked perfectly. Thank you!!!!!
    – David
    Feb 26, 2020 at 1:13

When I install Windows Admin Center onto server core, the setup also asks me whether I want to use Microsoft Update. This method has the added benefit of installing a powerful web-based management tool.

There may well be a more direct way, but this is handy if you want to install WAC anyway.

  • Login to the target server and run the following in an admin command prompt to generate a certificate and thumbprint:
    • The default expiration will be one year, you might modify that to 10 years by adding -NotAfter (Get-Date).AddYears(10)
    • New-SelfSignedCertificate -CertStoreLocation “cert:\LocalMachine\My” -NotAfter (Get-Date).AddYears(10) -DnsName $env:COMPUTERNAME
    • source
  • Note the thumbprint generated for later.
  • Copy the install file onto the target machine
    • Invoke-RestMethod -ContentType "application/octet-stream" -Uri http://aka.ms/WACDownload -OutFile C:\Users\Administrator\Downloads\WAC.msi
    • (Old way, if above doesn't work) Invoke-WebRequest -Uri http://aka.ms/WACDownload -UseBasicParsing -OutFile C:\Users\Administrator\Downloads\WAC.msi
  • Install the MSI on Server Core
    • For Full Interface:
      • You should be able to just run .\WAC.msi in the command line
      • If that doesn't work, try
        • msiexec.exe /i C:\Users\Administrator\Downloads\WAC.msi /qf /promptrestart /L*v log.txt SME_PORT=443 SSL_CERTIFICATE_OPTION=installed SME_THUMBPRINT=<THUMBPRINT>

I don't think you will see the prompt to enable Microsoft Update if it is already enabled. In that case, you can confirm it is enabled through WAC: enter image description here

  • 1
    Thank you Jon. I've already got Windows Admin Center installed on another computer in my lab and don't really want to be installing it on all my servers as I can already manage all of them through the single instance of WAC.
    – David
    Feb 26, 2020 at 1:08

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .