Services - Pause
Declaration
<AMSERVICES ACTIVITY="pause" SERVICE="text" REMOTEMACHINE="text" REMOTEDOMAIN="text" REMOTEUSERNAME="text" REMOTEPASSWORD="text (encrypted)" />
Description
Suspends execution a local or remote service. A running service may need to be paused in order to make minor modifications to a resource. Pausing a service puts it on hold, but it does not remove the software from memory. The Services - Resume activity can be used in a subsequent step to reactivate the paused service.
Practical usage
Can be used to pause a service before eventually stopping it to let users complete jobs or disconnect from resources. Users who already have a connection to the resource are able to finish their tasks, but new connections to the resource are prevented.
Parameters
Service
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Service Name | Text | Yes | (Empty) | SERVICENAME="Task Scheduler" | The name of the service to pause. |
Include devices in the list of services (local connection only) | --- | --- | --- | --- | If
enabled, indicates that device drivers will be included in the
Service name parameter's
drop-down list of services. This parameter is disabled by default
and is not available if a remote service is specified. NOTE: This parameter does not contain markup and is only displayed in visual mode for task construction and configuration purposes. |
Computer
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Local computer | --- | --- | --- | --- | If
enabled, indicates that this activity will be performed on a service
located on the local computer. This parameter is enabled by default.
If this parameter is selected, the Another
computer parameter becomes inactive. NOTE: This parameter does not contain markup and is only displayed in visual mode for task construction and configuration purposes. |
Another computer | --- | --- | --- | --- | If
enabled, indicates that this activity will be performed on a service
located on a remote computer. The parameters below become active
if this parameter is enabled. NOTE: This parameter does not contain markup and is only displayed in visual mode for task construction and configuration purposes. |
Computer | Text | Yes, if set to Another computer | (Empty) | REMOTEMACHINE="MachineName" | The computer name of the remote machine in which to connect to. |
Domain | Text | Yes, if set to Another computer | (Empty) | REMOTEDOMAIN="DomainName" | The domain that the remote machine belongs to. |
Username | Text | Yes, if set to Another computer | (Empty) | REMOTEUSERNAME="Username" | The username to use to sign in to the remote machine. This user must have the appropriate permissions to modify services on the remote machine. |
Password | Text | Yes, if set to Another computer | (Empty) | REMOTEPASSWORD="password" | The password to use to authenticate with the Username parameter. |
Example
- 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.
Description
This sample task pauses the Task Scheduler service.
<AMSERVICES ACTIVITY="pause" SERVICE="Task Scheduler" />