Computer - Shutdown

Declaration

<AMCOMPUTER ACTIVITY="shutdown" COMPUTER="text" PROMPT="YES/NO" DELAY="number" MEASURE="text (options)" MESSAGE="text" FORCE="YES/NO" />

Related Topics   

Description

Closes Windows and shuts down the computer.

Practical usage

Example 1: Administrators could create and deploy a task with this action to force system shutdown at a certain time at night.

Example 2: A task could be built very easily that would shut down the system quickly with just the press of a hot-key combination.

Parameters

General

Property Type Required Default Markup Description
Shut down local machine --- --- --- --- If enabled, specifies that the local machine will be shut down. If the Shut down a remote computer parameter is enabled, this parameter is ignored.  
NOTE: This parameter does not contain markup and is only displayed in visual mode for task construction and configuration purposes.
Shut down a remote computer --- --- --- --- If enabled, specifies that a remote computer will be restarted. If the Shut down local machine parameter is selected, this parameter is ignored.
NOTE: This parameter does not contain markup and is only displayed in visual mode for task construction and configuration purposes.
Computer to shut down Text Yes (Empty) COMPUTER="COMPUTERNAME" The computer name to shut down. This can be any valid computer name on the Windows network. In visual mode a drop-down is provided for convenience in selecting a machine name. If not specified, the current machine is assumed. Automate Desktop must also be running under a user account that has privileges/rights to shut down other machines (such as an administrator account). This parameter is active only if the Shut down a remote computer parameter is selected.
Prompt user to log off Yes/No No No PROMPT="YES" Specifies that Windows should display a dialog to the user with a countdown notifying the user that the system is about to be shut down. This will give the user time to save his/her work. Active only if the Shut down a remote computer parameter is selected.
Shutdown after Number No 5 DELAY="6" The amount of time that Windows should display the shut down notification dialog. This parameter is active only if the Prompt user to log off parameter is selected.
Measure Text (options) No Seconds MEASURE="minutes" Specifies the time measure that should be used in combination with the value entered in the Shutdown after parameter. This parameter is active only if the Prompt user to log off parameter is selected. The available options are:
  • Milliseconds - Time measurement is set to milliseconds.
  • Seconds (default) - Time measurement is set to seconds.
  • Minutes - Time measurement is set to minutes.
  • Hours - Time measurement is set to hours.
Message to display in the shut down dialog Text No (Empty) MESSAGE="Shut down is now in process." A user-defined message that windows should display on the shut down notification dialog. This parameter is active only if the Prompt user to log off parameter is selected. The message will be displayed for the number of seconds, minutes or hours specified in the Shutdown after  parameter.
Force the system to shut-down without notifying applications Yes/No No No FORCE="YES" If selected, specifies that the system should shut down immediately without notifying and waiting for applications to return that they are ready to close. This parameter is disabled by default.

Description

Error Causes

On Error

Examples

NOTE:
  • Copy and paste the sample AML code below directly into the Task Builder Steps Panel.
  • To successfully run the sample code, update parameters containing user credentials, files, file paths, or other information specific to the task to match your environment.

Example 1

This sample task shuts down a remote computer.

Copy
<AMCOMPUTER ACTIVITY="shutdown" COMPUTER="COMPUTER1" PROMPT="yes" MEASURE="minutes" MESSAGE="Save all your work immediately" FORCE="yes" />

Example 2

This sample task shuts down the local computer.

Copy
<AMCOMPUTER ACTIVITY="shutdown" FORCE="yes" />