Would you like to learn how to shutdown Windows using Powershell? In this tutorial, we are going to show you how to use Powershell to shutdown or restart a computer running Windows.

• Windows 2012 R2
• Windows 2016
• Windows 2019
• Windows 10
• Windows 7

Equipment list

The following section presents the list of equipment used to create this tutorial.

As an Amazon Associate, I earn from qualifying purchases.

Related tutorial - PowerShell

On this page, we offer quick access to a list of tutorials related to PowerShell.

Tutorial Powershell - Shutdown the computer

Start a Powershell command-line.

Start Powershell

Shutdown the computer using Powershell.

Copy to Clipboard

Force all applications to close and shutdown Windows immediately.

Copy to Clipboard

Shutdown a remote computer using Powershell.

Copy to Clipboard

Shutdown a remote computer using a different credential.

Copy to Clipboard

Enter the credentials to shutdown the remote computer.

Powershell - Shutdown credential

Shutdown a remote computer using a stored credential.

Copy to Clipboard

There are multiple ways to use Powershell and a stored credential to shutdown a remote computer.

Copy to Clipboard

Shutdown multiple computers using Powershell.

Copy to Clipboard

Create a text file containing the name or IP address of multiple computers.

Copy to Clipboard

In our example, we create a text file named MYFILE in the root of drive C.

Shutdown remote computers by reading the name or IP address from a text file.

Copy to Clipboard

Restart a computer using Powershell.

Copy to Clipboard

Congratulations! You are able to shutdown computers using Powershell.