Skip to main content

Synopsis

Sends one or more named control commands to the running LTService agent. Commands are dispatched as service control codes via sc.exe control LTService <code>. The function accepts pipeline input and processes multiple commands in a single call.

Syntax

Parameters

String[]
required
One or more commands to send to the agent. Accepts pipeline input. Must be one of the validated command names listed in the Known commands section below.
  • Position: 1
  • Pipeline input: yes (ByValue)
SwitchParameter
Shows what would happen if the command runs without actually sending any control codes.
SwitchParameter
Prompts for confirmation before sending each command.

Known commands

The -Command parameter is validated against the following set. Passing a value not in this list will produce a validation error.
LTService must be installed and in the Running state. If the service is stopped or not found, a warning is written and no command is sent.

Examples

Send an immediate status check-in:
Kill VNC and tray processes in a single call:
Send multiple commands via the pipeline: