Jan 212022
 
sconfig Server Configuration menu

We’re all used to updating our Windows Server operating systems with the Windows Update GUI, but did you know that you can update your server using command prompt and “sconfig”?

The past few years I’ve been managing quite a few Windows Server Core Instances that as we all know, do not have a GUI. In order to update those instances, you need to run Windows Update using the command line, but this method actually also works on normal Windows Server instances with the GUI as well!

Windows Update from CLI (Command Prompt)

Please enjoy this video or read on for why and how!

Why?

Using a GUI is great, however sometimes it’s not needed, and sometimes it even causes problems if it looses the backend connection where it’s pulling the data from. I’ve seen this true on newer Windows operating systems where the Windows Update GUI stops updating and you just sit there thinking the updates are running, when they are actually all complete.

The GUI also creates additional overhead and clutter. If there was an easier alternative to perform this function, wouldn’t it just make sense?

On Windows Server instances that have a GUI, I find it way faster and more responsive to just open an elevated (Administrative) command prompt, and kick off Windows Updates from there.

How

You can use this method on all modern Windows Server versions:

  • Windows Server (with a GUI)
  • Windows Server Core (without a GUI)

This also works with Windows Server Update Services so you can use this method either connecting to Windows Update (Microsoft Update) or Windows Server Update Services (WSUS).

Now lets get started!

  1. Open an Administrative (elevated) command prompt
  2. Run “sconfig” to launch the “Server Configuration” application
    command prompt launch sconfig
  3. Select option “6” to “Download and Install Windows Updates”
    sconfig Server Configuration menu
  4. Choose “A” for all updates, or “R” for recommended updates, and a scan will start
  5. After the available updates are shown, choose “A” for all updates, “N” for no updates, or “S” for single update selection

After performing the above, the updates will download and install.

sconfig Windows Update running
“sconfig” Windows Update downloading and installing

I find it so much easier to use this method when updating many/multiple servers instead of the GUI. Once the updates are complete and you’re back at the “Server Configuration” application, you can use option “13” to restart Windows.

  8 Responses to “Windows Server Windows Update using CLI (Command Prompt) and “sconfig””

  1. Hi, can I ask you what will happen to the pop up window once the update is done installing? Does it close off the window by itself?

    I have tried it and my window is at installing updates for quite awhile and nothing is happening to indicate that the update has successfully installed. The only means for me to check is get-hotfix in powershell to check if the new update is listed and I am not sure if I can just close off the install window.

    Thank you.

  2. Hi Alex,

    If nothing is happening and it says “Installing Updates”, then that means it is still in the process of installing updates. I’d recommend waiting for this to complete.

    Once completed it will notify you that the updates have been installed.

    Cheers,
    Stephen

  3. Hi Stephen,

    Thanks for the guide, it is really helpful to me.

    After waiting for awhile, I finally see the update complete and prompt me for a restart.

    Regards,
    Alex

  4. WOW!! I have been an SMS-SCCM Admin for 15 years, and have never seen this command.

  5. Problem I have is this rarely finds any updates. I see them when I look at updates in Admin Center, but never in sconfig.

  6. My experience, at least on Server 2012R2 Core, is that sconfig does not respect selecting a single update. If you tell it to “S” and the provide the number of the update you want to install, it will install multiple updates.

  7. We are using SCCM to manage our updates. I don’t like it and typically just click check Microsoft for updates to bypass our WSUS servers. How can I in Windows Server 2016 Core click the equivalent of Check Microsoft for updates in CLI?

  8. Hi Jason,

    Unfortunately I don’t think it’s possible using “sconfig”. “sconfig” will use whatever update mechanism has been configured on the host with GPOs, etc.

    There may be other commands to update in the way you’re looking for, but I’m unaware of them.

    Cheers,
    Stephen

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)