banner



How To Reboot A Windows Server

There will be times as a Windows Administrator that you volition need to reboot or shutdown a remote computer or server.

In this tutorial, I'll show you two easy methods for rebooting and shutting downward remote computers.

The get-go method uses a congenital in Windows control and the 2d method uses PowerShell.

Cheque it out.

Windows Shutdown Command

Windows systems has a congenital in shutdown command that can be used to restart or shutdown local and remote computers.

The command is shutdown.

To use this command merely open the windows command prompt and blazon shutdown.

To view the full list of command options type shutdown /? in the CMD window.

There are several command line switches, below I list the most useful options.

/due south – Shutdown the figurer

/r – restart computer

/m \\figurer – Specify the remote reckoner

/l – Log off

/t xxx – Set the time out period before shutdown to xxx seconds

/c "annotate" – Message to display on the screen before restart or shutdown

Now lets move onto some examples

Restart or Shutdown Examples with Command Line

In these examples, I'll be on PC1 and volition initiate a remote restart or shutdown on PC2.

I'll be using the /r switch in these examples, you can change them to /southward to shutdown instead of restart.

Example one: Restart Remote Computer

By default, this volition prompt the remote figurer and requite it most a minute before it restarts.

shutdown /r /m \\pc2

The pop upwardly beneath is what a Windows 10 system will display.

Example 2: Restart With a Custom Message

Yous may want to display a custom message to the logged on users, to do that only use the /c command.

shutdown /1000 \\pc2  /c "The Information technology section has initiated a remote restart on your computer"

Beneath is the pop up on the remote reckoner with the custom message.

Example 3: Immediate Restart no Countdown

If you desire to immediately restart with no inaugural or message use this command.

shutdown /r /yard \\pc2 /t 0

If you want a longer countdown but specify the seconds /t 60

Instance iv: Log user off remote computer

If you simply desire to log a user off the remote figurer use this command.

shutdown /l /m\\pc2

Restart or Shutdown with Powershell

Here are a few examples of how you tin restart or shutdown computers with PowerShell.

The downside to PowerShell is it doesn't have as many options every bit the shutdown control. In that location is no option to prompt users with a custom message or provide a countdown.

Example ane: Utilise Powershell to restart a calculator

This command will immediately restart a remote computer. The -Force choice will strength a restart fifty-fifty if a user is logged on.

Restart-Computer -ComputerName REMOTE_COMPUTER_NAME -Force

Instance 2: Utilise PowerShell to shutdown a figurer

This command volition shutdown a remote computer. Utilise the -Force to force a shutdown even if a user is logged on.

Stop-Computer -ComputerName REMOTE_COMPUTER_NAME -Force

Example 3: Apply PowerShell to restart a list of computers

This is handy if you have several computers to restart. Merely list all the computers you want in a text file and add together that to the PowerShell command.

restart-calculator (get-content c:\work\computers.txt)

Instance four: Use PowerShell to shutdown downwards two computers

Cease-Reckoner -ComputerName "Server01", "Server02"

Have fun!

Source: https://activedirectorypro.com/restart-shutdown-remote-computer/

Posted by: lieberknespolow.blogspot.com

0 Response to "How To Reboot A Windows Server"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel