Home » PowerShell » PowerShell: Restart-Computer

PowerShell: Restart-Computer

The Restart-Computer cmdlet restarts the operating system on the local and remote computers.

This cmdlet can be used to restart the local or a remote computer. You don’t even need PowerShell 2.0 installed on the remote computer or even use the remoting feature unless you want to run the task as a background job. I don’t see a need for that unless you are attempting to restart more than a handful of remote computers at once.

Rebooting a few servers is as easy as this:

PS C:\>restart-computer -computername PRINT01,APP02,FILE01

All I need to do is specify a comma-separated list of server names. Or if you prefer to run through a text list of computer names, then do this:

PS C:\> restart-computer -ComputerName (get-content \\ITSRV\files\servers.txt) -force


PS C:\> restart-computer -ComputerName (get-content C:\servers.txt) -force

For Detailed information about Resart-Computer cmdlet, use Get-Help Restart-Computer -Full in your PowerShell console.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: