Restarting a Windows Server using the command line interface is a fundamental administrative task, ensuring system stability and resolving issues that might arise during operation. Regardless of the Windows version you're working with, performing a server restart through the command line remains a vital skill for system administrators. In this article, we’ll help you learn how to restart Windows server command line or CMD Restart Command.

Prerequisites of CMD Restart Command

Before delving into the process of how to restart a Windows server via command line, ensure the following prerequisites are in place. It's also important to note that when managing Windows dedicated server hosting having a reliable method for restarting your server through the command line can be essential for maintaining uptime and resolving issues efficiently.

  1. Administrator Access: Ensure you have administrative privileges or an account with appropriate permissions to execute commands on the server.

  2. Command Line Access: Access to the Command Prompt or PowerShell, depending on your preferred method for executing commands.

  3. Knowledge of Command Syntax: Familiarity with the appropriate command syntax, such as the shutdown command and its various options (/r for restart, /m \\servername for remote server, etc.).

  4. Operating System Version: Verify the specific Windows Server version (e.g., Windows Server 2012, Windows Server 2019) to ensure compatibility with the command syntax and functionalities available for that version.

How to Restart Server from Command Prompt

When you want to learn how to restart windows server command line Windows 10, there’s a specific command you need to know. The primary command used to restart a server via Command Prompt is shutdown. Here's how to initiate a server restart using this command:

  1. Access Command Prompt: Open the Command Prompt as an administrator by searching for "Command Prompt," right-clicking, and selecting "Run as administrator."

  2. Execute Restart Command: In the Command Prompt window, type the following command and press Enter:

shutdown /r

 How to Restart Server from Command Prompt

Basically, this command is what you need if you want to learn how to restart windows server 2012 from command prompt. 

Additional Options To Reboot Windows from Command Prompt Windows 11/10

The shutdown command provides additional options to customize the restart process according to specific requirements:

Remote Server Restart: To restart a remote server, add the /m \\servername option to the command, replacing "servername" with the appropriate remote server name.

shutdown /r /m \\servername

Delayed Restart: Adding the /t option allows you to set a delay (in seconds) before the restart occurs. For instance, to delay the restart for 60 seconds:

shutdown /r /t 60

Restart Windows from PowerShell

Now that you’ve learned how to restart windows server command line, let’s talk about PowerShell as well. Utilizing PowerShell to restart a Windows server presents another powerful method for system administrators to manage server operations efficiently. PowerShell offers a more robust and script-oriented approach compared to the Command Prompt, enabling greater control and automation capabilities.

How to reboot windows server with PowerShell

The primary cmdlet for restarting a server in PowerShell is Restart-Computer. Here's how you can execute a server restart using PowerShell:

  1. Launch PowerShell as Administrator: Search for PowerShell in the Start menu, right-click it, and choose "Run as administrator" to open PowerShell with elevated privileges.

  2. Execute Restart Command: In the PowerShell window, type the following command and press Enter:

Restart-Computer

Using PowerShell for Server Restart

This command initiates an immediate restart of the local system.

Additional Options and Customizations

The Restart-Computer cmdlet offers additional parameters to enhance flexibility:

  • Delaying the Restart: You can delay the restart using the -Delay parameter. For instance, to delay the restart for 60 seconds:

Restart-Computer -Delay 60

  • Restarting a Remote Server: To restart a remote server, specify the -ComputerName parameter followed by the name of the remote server.

Restart-Computer -ComputerName "NAME_OF_SYSTEM"

Replace "NAME_OF_SYSTEM" with the name of the remote server.

Wrapping Up

We’ve reached the end of our guide on how to restart Windows server command line. In summary, mastering the shutdown command in Command Prompt and the Restart-Computer cmdlet in PowerShell provides system administrators with essential tools for restarting Windows Servers across multiple versions. These commands offer flexibility, allowing immediate restarts, delayed reboots, and remote server management. 

In this article, we tried to help you learn how to restart windows server command line windows 7, as well as other Windows versions. We hope you found the article helpful!

By the way, if you’re curious about how to change the Windows Server password, read our article on this topic as well.

CMD Restart Command FAQs

1. How do I restart Windows Terminal server?

To restart the Windows Terminal Server, you can use the shutdown command in Command Prompt or PowerShell. For instance:

shutdown /r /m \\terminal_server_name

Replace terminal_server_name with the name of the Terminal Server.

2. How do I restart Windows Server service?

To restart a specific service on a Windows Server, you can use the net command or PowerShell. For example, to restart the "Windows Update" service:

net stop wuauserv net start wuauserv

3. What is the server restart command?

The command commonly used to restart a server in Windows is the shutdown command. For an immediate server restart:

shutdown /r

4. How to restart Windows service in cmd?

To restart a specific Windows service in Command Prompt, you can use the net command. For instance, to restart the "Print Spooler" service:

net stop spooler net start spooler