Documentation Index
Fetch the complete documentation index at: https://mintlify.com/LabtechConsulting/LabTech-Powershell-Module/llms.txt
Use this file to discover all available pages before exploring further.
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).
- Server password
- Installer token
| Parameter | Required | Description |
|---|---|---|
-Server | Yes | URL to the Automate server used to download the MSI. |
-ServerPassword | Yes (this method) | Server system password (SELECT SystemPassword FROM config;). |
-LocationID | No | Location the agent registers into. Defaults to 1. |
-TrayPort | No | Port LTSvc.exe listens on for tray communication. Defaults to 42000. |
-Hide | No | Hides the agent from Add/Remove Programs after install. |
-SkipDotNet | No | Skips the .NET 3.5 check. Use when .NET 4.0+ is already present. |
-Force | No | Bypasses some pre-install checks, including prior-install detection. |
-NoWait | No | Returns immediately after the MSI finishes without waiting for agent registration. |
Full install with all options
Confirming registration
After installation completes, useGet-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.
- Stops
LTServiceandLTSvcMon - Downloads
LabtechUpdate_<version>.zipfrom the server - Extracts and runs the updater
- 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.
Call Redo-LTService
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.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.
-Backup directly to Uninstall-LTService or Redo-LTService to trigger the backup automatically:
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.
| Parameter | Description |
|---|---|
-Server | Server URL used to download uninstall utilities. Falls back to the registry value if omitted. |
-Backup | Runs New-LTServiceBackup before uninstalling. |
-Force | Allows uninstall to proceed on probe agents. |