5 C
Texas

How to shutdown and reboot Windows Server 2022 with commands.

We continue to explore the features of Windows Server 2022. It is well known that this is Microsoft’s next solution for enterprise environments. Well, like its predecessors, this version has variants with and without a graphical environment. In addition, it is well known that a common task is to shut down or restart the server. Therefore, this can be done from the start menu. However, in environments without a graphical plug-in, then we can do it from the command line. Read on to find out How to shutdown and reboot Windows Server 2022 with commands.

How to restart Windows Server 2022

The first thing you have to do is to open a CMD as administrator. Then use the following syntax:

shutdown /r /t time

Please replace Time with the time you want to wait for the server to restart.

Scheduling Windows Server 2022 reboot
Scheduling Windows Server 2022 reboot
- Advertisement -

This means that after 200 seconds, the server will be restarted. On the other hand, it is possible to add a message at restart time. For this purpose, just add the -c parameter:

shutdown /r /t time -c  message

The server will restart after the timeout period has elapsed. On the other hand, sometimes there are open programs that prevent a restart. In such a case it is possible to force a shutdown using the following command:

shutdown /r /f

It is even possible to schedule this task for a remote computer. With this in mind, use the following syntax:

shutdown /r /f /m \\Computer

How to shutdown Windows Server 2022 with commands

The commands for shutting down the server are very similar to that for restarting it. In fact, only the first element changes. So use the following syntax:

shutdown /s /t time
Scheduling server shutdown after 400 seconds
Scheduling server shutdown after 400 seconds

To add a message we use the -c parameter as follows:

shutdown /s /t time -c message

To force applications to close we run:

shutdown /s /f

It is also possible to use it with remote computers:

shutdown /s /f /m \\COMPUTER

Ultimately, we have seen how to shutdown and reboot Windows Server 2022 with commands. Consequently, we have an expeditious way to manage these tasks on the server. Bye!

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article