PackageDeployment Module Help

Package Deployment Module

Stop-PdProcess Cmdlet

Version 4.0.0.5

Stop-PdProcess

Synopsis

Terminate a Process

Syntax

Stop-PdProcess [-Name] <String> [[-NameOf] <String>] [[-Select] <String>] [-ContinueOnError] [-IncludeChildren] [-SupportUninstall] [[-Context] <String>] [<CommonParameters>]

Description

Use this command to terminate any process. The command checks all processes currently running and terminates the required process and/or application. Please note that any unsaved data may be lost!

Parameters

-Context <String>

User: Execution under user account; logging in HKEY_CURRENT_USER, i.e. for the user.
UserPerService: User-related command, execution in Service context.
Computer: Execution under user account; logging in HKEY_CURRENT_MACHINE, i.e. for the computer.
ComputerPerService: Execution in service context; logging in HKEY_LOCAL_MACHINE, i.e. for the computer.

Required

False

Position

3

Accepts pipeline input

False

-ContinueOnError <SwitchParameter>

Continues script execution in spite of errors in the respective command

Required

False

Position

Named

Accepts pipeline input

False

-IncludeChildren <SwitchParameter>

Select the box to terminate any associated child processes.

Required

False

Position

Named

Accepts pipeline input

False

-Name <String>

Select the type of process to terminate by clicking an option from the Identify process by pane. Use either ? or * wildcards to identify a single or multiple characters respectively.

Required

True

Position

0

Accepts pipeline input

False

-NameOf <String>

File: If you enter, for example, Winword.exe, WinWord will be terminated. If you enter Winwor*, also Winword will be terminated.
Window: Enter the caption of the window which is opened by the respective process.
This allows you to terminate a specific process, if the same EXE file was started several times.
If you enter Explorer.exe, the Explorer will be terminated. This command allows you to activate policy changes: After terminating a process, you can modify the respective registry entries (RegLoad, RegModify, etc.) and then restart the Explorer with the Execute command.

Required

False

Position

1

Accepts pipeline input

False

-Select <String>

FirstMatch: Only the first process on the list of all running processes will be terminated. If there are several instances of an application, only one will be terminated. In this case, you need to call the command several times
AllMatches: All instances of an application will be terminated.

Required

False

Position

2

Accepts pipeline input

False

-SupportUninstall <SwitchParameter>

Also terminates processes during an uninstallation.

Required

False

Position

Named

Accepts pipeline input

False

<CommonParameters>

For more information about common parameters, type "Get-Help about_CommonParameters".