SynopsisStops a program or executable on a remote computer.
- Stop-RemoteProcess [-ID] [-ComputerName] [-Credential]
- Stop-RemoteProcess [-Name] [-ComputerName] [-Credential]
DescriptionStop-RemoteProcess is used to halt executables on remote computers. It is similar to the built-in Stop-Process cmdlet, but can also be used against remote machines
Stop-RemoteProcess can be used alone or in conjunction with Get-Process.
- ID The process ID (PID) of the process to halt. This parameter cannot be used in conjunction with the -Name parameter.
- Name The name of the process to halt. Wildcards are not supported and exact process names must be used. This parameter cannot be used in conjunction with the -ID parameter.
- ComputerName The computer on which to halt the process.
- Credential The credentials under which to halt the process.
InputsStop-RemoteProcess accepts as pipeline input any object with a PID or ID parameter.
OutputsStop-RemoteProcess does not output any PowerShell objects.
NotesThe cmdlet requires that the Remote Registry and RPC services are started on the computer it is trying to access and that DNS services are available to resolve target host names.
Example 1This command will halt any notepad processes on the remote computer PC01:
C:\PS>Stop-RemoteProcess -Name Notepad -ComputerName PC01
Example 2Stop-RemoteProcess can be used in conjunction with the Get-Process cmdlet. This command will halt any notepad processes on the remote computer PC01:
C:\PS>Get-Process Notepad -Computer PC01 | Stop-RemoteProcess
Example 3Stop-RemoteProcess does not translate wildcards in process names, but wildcard searches can still be performed using Get-Process to discover processes on the remote computer. This command will halt any processes with names that start "Note" on remote computer PC01:
C:\PS>Get-Process Note* -Computer PC01 | Stop-RemoteProcess