PackageDeployment Module Help

Package Deployment Module

Register-SystemShutdown Cmdlet

Version 4.0.0.5

Register-SystemShutdown

Synopsis

Initiate System Shutdown

Syntax

Register-SystemShutdown [[-Timeout] <Int32>] [[-Message] <String[]>] [[-Context] <String>] [-AskUser] [-ContinueOnError] [-ForceLogoff] [-Restart] [<CommonParameters>]

Description

Use this command to shut down a Windows workstation and optionally reboot it.

Parameters

-AskUser <SwitchParameter>

Ask user before shutting down Windows.

Required

False

Position

Named

Accepts pipeline input

False

-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

2

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

-ForceLogoff <SwitchParameter>

Currently running applications will be shut down and all unsaved data will be lost. The system will shut down without the user being prompted once more; the user cannot prevent the shutdown.

Required

False

Position

Named

Accepts pipeline input

False

-Message <String[]>

Enter an additional message that will be displayed when a Windows workstation shuts down.

Required

False

Position

1

Accepts pipeline input

False

-Restart <SwitchParameter>

The workstation will be rebooted after shutdown.

Required

False

Position

Named

Accepts pipeline input

False

-Timeout <Int32>

Enter the time in seconds before the Windows NT workstation will shut down.

Required

False

Position

0

Accepts pipeline input

False

<CommonParameters>

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