Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

Change Service State activity

The Change Service State activity starts or stops a Windows service on a remote system.

This activity replaces a Powershell activity by the same name available in releases prior to Istanbul. If you have a workflow created in a previous version that uses the deprecated activity, your workflow will continue to work normally after upgrading to Istanbul. However, all new workflows must use the custom version of this activity. This activity was built with the Powershell activity template, which gives workflow administrators the ability to store input and output variables in the databus.

Input Variables

VariableDescription
hostnameHostname or IP address of the target Windows machine on which the service is installed. Use the Resolve DNS activity to resolve hostnames into IP addresses.
serviceName of the Windows service to start or stop. The service parameter is the service name, not the display name of the service affected.
stateThere are two actions to select for a service state change: StartService or StopService.

Output variables

VariableDescription
errorMessageThe executionResult.errorMessages from the Activity designer parsing sources. If there is no error, this value is null.

Conditions

ConditionDescription
SuccessThe target service was successfully started or stopped.
FailureThe update to the target service was unsuccessful, or the service was not found on the target system.

Parent Topic:PowerShell activity pack