Skip to main content
All lifecycle operations require an Administrator PowerShell session. The module checks group membership at startup and throws immediately if it detects a non-admin context.

Overview

The LabTech PowerShell module manages the full lifecycle of the ConnectWise Automate agent on a Windows endpoint — from a clean install through routine updates, repairs, and clean removal.

Installing the agent

Install-LTService downloads the agent MSI from the server and runs a silent install. Two authentication methods are supported: a server password (classic) and an installer token (token-based, no plain-text password required).

Full install with all options

Confirming registration

After installation completes, use Get-LTServiceInfo to verify the agent received an ID from the server. An ID of 1 or higher means the agent has checked in successfully.
Get-LTServiceInfo reads from HKLM:\SOFTWARE\LabTech\Service and returns a rich object with server addresses, version, tray port, location, and more:

Updating the agent

Update-LTService downloads the update package from the server and applies it without a full reinstall.
Omitting -Version instructs the module to query the server for its current advertised version and apply that. The function will warn and exit if the installed version is already at or above the requested version.
The update process:
  1. Stops LTService and LTSvcMon
  2. Downloads LabtechUpdate_<version>.zip from the server
  3. Extracts and runs the updater
  4. Restarts the services

Reinstalling / repairing

Redo-LTService (alias: ReInstall-LTService) performs a full uninstall followed by a fresh install in a single call. It reads the existing server address and location from the registry automatically, so you do not need to supply them if the agent is currently installed.
1

Call Redo-LTService

Internally, Redo-LTService calls Uninstall-LTService -Force then waits 20 seconds before calling Install-LTService. The -Force flag on the uninstall step is always passed, so probe-agent detection does not block the operation at the uninstall stage.
2

Verify the reinstall

Probe agent caution. Redo-LTService will refuse to run on an agent flagged as a probe (Probe = 1 in the registry) unless you pass -Force. The same applies to Uninstall-LTService. Always confirm whether an endpoint is a probe before running lifecycle operations.

Backing up before changes

New-LTServiceBackup copies the agent’s registry keys under HKLM\SOFTWARE\LabTechBackup and copies the LTSVC folder to <BasePath>Backup. Run it before any destructive operation.
You can also pass -Backup directly to Uninstall-LTService or Redo-LTService to trigger the backup automatically:
To restore or inspect backup data:

Uninstalling the agent

Uninstall-LTService stops all services, downloads the uninstall MSI and Agent_Uninstall.exe from the server, runs both, scrubs remaining files under %windir%\LTSVC, and removes all known registry keys.
If the server is unreachable, the uninstaller falls back to downloading Agent_Uninstall.exe from https://s3.amazonaws.com/assets-cp/assets/Agent_Uninstall.exe and continues the scrub process without the MSI step.

Complete lifecycle workflow

1

Back up the current agent

2

Check agent status

3

Update in place

4

Reinstall if update is insufficient

5

Uninstall completely