Services - Start
Declaration
<AMSERVICES SERVICE="text" REMOTEMACHINE="text" REMOTEDOMAIN="text" REMOTEUSERNAME="text" REMOTEPASSWORD="text (encrypted)" />
Description
Starts a service on the local or remote machine.
Practical usage
Generally used to start a service that is currently in a stopped state.
Parameters
Service
Property | Type | Required | Default | Markup | Description |
---|---|---|---|---|---|
Service name | Text | Yes | (Empty) | SERVICENAME="Task Scheduler" | The name of the service to start. |
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
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.
Description
This sample task starts the Task Scheduler service.
NOTE: This example is for the
purpose of viewing AML syntax only. Changing the state of a service might
yield negative results.
Copy
<AMSERVICES SERVICE="Task Scheduler" />