How do I start Windows Server 2022 from command line

 

How do I start Windows Server 2022 from command line

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
    How do I start Windows Server 2022 from command line
  3. Select option “6” to “Download and Install Windows Updates”
    How do I start Windows Server 2022 from command line
  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.

How do I start Windows Server 2022 from command line
“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.

Chapter 6

Working at the Command Line

IN THIS CHAPTER

How do I start Windows Server 2022 from command line
Opening an administrative Command Prompt to manage your server

How do I start Windows Server 2022 from command line
Configuring the command line for use

How do I start Windows Server 2022 from command line
Setting up user and session environmental variables

How do I start Windows Server 2022 from command line
Getting additional help at the command line

How do I start Windows Server 2022 from command line
Understanding command line symbols and what they do

Just about every system administrator has worked with the Command Prompt at some point in their career. The Command Prompt is a launching point for a number of diagnostic utilities and a great resource for gathering information, in addition to being a utility to automate repetitive tasks.

This chapter discusses working with the command line — from the basics on how to use the command line to how to customize it to your liking.

Opening an Administrative Command Prompt

The simplest way to get to the Command Prompt in Windows Server 2022 is to click the Start menu, scroll down to Windows System, and click Command Prompt. This will run the Command Prompt in an unprivileged state.

For ...

What is the command to open the server configuration?

Type SConfig , and then press Enter . The Server configuration tool interface opens.

How can I activate Windows Server 2022 free?

How to download, install and activate Windows Server 2022 Standard.
Download your Windows Server version from Microsoft's website: ... .
Choose "Windows Server 2022" and download the image file..
Copy the required files to a DVD or an USB flash drive and perform the installation..