PowerShell Logo Small


This is the built-in help made by Microsoft for the command 'Stop-Computer', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.


Stops (shuts down) local and remote computers.


Stop-Computer [[-ComputerName] [<String[]>]] [[-Credential] [<PSCredential>]] [-AsJob] [-Authentication {Default | None | Connect | Call | Packet | PacketIntegrity |
PacketPrivacy | Unchanged}] [-Force] [-Impersonation {Default | Anonymous | Identify | Impersonate | Delegate}] [-InformationAction {SilentlyContinue | Stop | Continue |
Inquire | Ignore | Suspend}] [-InformationVariable [<System.String>]] [-ThrottleLimit [<Int32>]] [-Confirm] [-WhatIf] [<CommonParameters>]

Search powershellhelp.space


The Stop-Computer cmdlet shuts down computers remotely. It can also shut down the local computer.

You can use the parameters of Stop-Computer to run the shutdown operations as a background job, to specify the authentication levels and alternate credentials, to limit the
concurrent connections that are created to run the command, and to force an immediate shut down.

This cmdlet does not require Windows PowerShell remoting unless you use the AsJob parameter.



Online Version: http://go.microsoft.com/fwlink/p/?linkid=293921




-------------------------- EXAMPLE 1 --------------------------

PS C:\>stop-computer

This command shuts down the local computer.

-------------------------- EXAMPLE 2 --------------------------

PS C:\>stop-computer -computername Server01, Server02, localhost

This command stops two remote computers, Server01 and Server02, and the local computer, identified as "localhost".

-------------------------- EXAMPLE 3 --------------------------

PS C:\>$j = stop-computer -computername Server01, Server02 -asjob
PS C:\>$results = $j | receive-job
PS C:\>$results

These commands run a Stop-Computer command as a background job on two remote computers, and then get the results.

The first command uses the AsJob parameter to run the command as a background job. The command saves the resulting job object in the $j variable.

The second command uses a pipeline operator to send the job object in $j to the Receive-Job cmdlet, which gets the job results. The command saves the results in the $results

The third command displays the result saved in the $results variable.

Because the AsJob parameter creates the job on the local computer and automatically returns the results to the local computer, you can run the Receive-Job command as a local

-------------------------- EXAMPLE 4 --------------------------

PS C:\>stop-computer -comp Server01 -impersonation anonymous -authentication PacketIntegrity

This command restarts the Server01 remote computer. The command uses customized impersonation and authentication settings.

-------------------------- EXAMPLE 5 --------------------------

PS C:\>$s = get-content domain01.txt
PS C:\>$c = get-credential domain01\admin01
PS C:\>stop-computer -computername $s -force -throttlelimit 10 -credential $c

These commands force an immediate shut down of all of the computers in Domain01.

The first command gets a list of computers in the domain and saves it in the $s variable.

The second command gets the credentials of a domain administrator and saves them in the $c variable.

The third command shuts down the computers. It uses ComputerName parameter to submit the list of computers in the $s variable, the Force parameter to force an immediate
shutdown, and the Credential parameter to submit the credentials saved in the $c variable. It also uses the ThrottleLimit parameter to limit the command to 10 concurrent