Skip to main content
All commands below require an Administrator PowerShell session. The module will throw immediately if run without elevation.

Common problems

The agent services (LTService, LTSvcMon) may have crashed, been killed by security software, or left in a bad state after an update.Stop and restart the services cleanly:
Stop-LTService
Start-LTService
Stop-LTService sends kill commands to VNC and tray processes first, then stops the Windows services, then terminates any remaining LTSVC, LTSvcMon, and LTTray processes by name. Start-LTService checks for TrayPort conflicts before starting, increments the port if needed, and sends a Send Status command once the services are running.Check for recent errors in the agent log:
Get-LTError | Where-Object { $_.Timestamp -gt (Get-Date).AddHours(-1) }
Restart instead of stop + start:
Restart-LTService
The agent is running but not communicating with the server.Force an immediate status send:
Invoke-LTServiceCommand 'Send Status'
Verify the server address stored in the registry:
$info = Get-LTServiceInfo
Write-Output "Server: $($info.Server)"
Write-Output "Agent ID: $($info.ID)"
Write-Output "LocationID: $($info.LocationID)"
If the server address is wrong or missing, the agent cannot check in. Use Redo-LTService with the correct -Server value to reinstall and point the agent at the right server.Test network connectivity to required ports:
Test-LTPorts
Test-LTPorts checks TCP connectivity to ports 70, 80, and 443 on the Automate server, and port 8002 on mediator.labtechsoftware.com. Any failure here indicates a firewall or routing problem that must be resolved independently of the module.Send inventory and status immediately:
Invoke-LTServiceCommand 'Send Inventory'
Invoke-LTServiceCommand 'Send Status'
Install-LTService can fail for several reasons. Work through these checks in order.Run as Administrator. The module checks this at startup:
# Verify you are in an elevated session
[bool](([System.Security.Principal.WindowsIdentity]::GetCurrent() |
    Select-Object -Expand groups -EA 0) -match 'S-1-5-32-544')
# Must return True
.NET 3.5 not installed. By default Install-LTService requires .NET 3.5. On modern systems where .NET 4.0+ is already present, skip the .NET check:
Install-LTService `
    -Server 'https://automate.example.com' `
    -ServerPassword 'sQWZzEDYKFFnTT0yP56vgA==' `
    -LocationID 42 `
    -SkipDotNet
-SkipDotNet prevents the module from attempting to enable the NetFx3 Windows optional feature, which can fail in environments without access to Windows Update or installation media.Previous install remnants detected. If Install-LTService finds existing registry keys or the %windir%\LTSVC folder, it calls Uninstall-LTService automatically. If that fails, use -Force:
Install-LTService `
    -Server 'https://automate.example.com' `
    -ServerPassword 'sQWZzEDYKFFnTT0yP56vgA==' `
    -LocationID 42 `
    -Force
Check the install log:
Get-Content "$env:windir\Temp\LabTech\LTAgentInstall.log" | Select-Object -Last 50
LTSvc.exe listens on the TrayPort (default 42000) for communication with LTTray. If another process owns that port the service will fail to start or will silently increment the port.Check which process owns the TrayPort:
Test-LTPorts
Test-LTPorts reports whether port 42000 (or the configured TrayPort) is in use and by which process. If the port is held by LTSvc itself, things are healthy. If another process owns it, you have a conflict.Install on an alternate TrayPort:
Install-LTService `
    -Server 'https://automate.example.com' `
    -ServerPassword 'sQWZzEDYKFFnTT0yP56vgA==' `
    -LocationID 42 `
    -TrayPort 42001
Install-LTService itself tests ports 42000–42009 before the MSI runs and automatically selects the first available port if the default is in use.Check the port after install:
(Get-LTServiceInfo).TrayPort
Agents flagged as probes (Probe = 1 in HKLM:\SOFTWARE\LabTech\Service) are protected from unintentional uninstalls and reinstalls. The module checks this flag at the start of Uninstall-LTService, Redo-LTService, and Reset-LTService and throws by default.Check whether the agent is a probe:
$info = Get-LTServiceInfo
Write-Output "Probe: $($info.Probe)"
Override the protection with -Force:
Uninstall-LTService -Force
Redo-LTService -Force
Uninstalling a probe agent removes network scanning and monitoring capabilities for the entire site segment. Confirm with the Automate administrator before using -Force on a probe.
The agent writes errors to %ltsvcdir%\LTErrors.txt (default: %windir%\LTSVC\LTErrors.txt). Get-LTError (alias for Get-LTErrors) parses this file into objects with ServiceVersion, Timestamp, and Message properties.Errors from the last 24 hours:
Get-LTError | Where-Object { $_.Timestamp -gt (Get-Date).AddHours(-24) }
Errors from the last hour:
Get-LTError | Where-Object { $_.Timestamp -gt (Get-Date).AddHours(-1) }
Browse all errors in a sortable grid (requires a desktop session):
Get-LTError | Out-GridView
Filter by message text:
Get-LTError | Where-Object { $_.Message -match 'timeout' }
For probe-specific errors, use Get-LTProbeErrors which reads LTProbeErrors.txt with the same object structure:
Get-LTProbeErrors | Where-Object { $_.Timestamp -gt (Get-Date).AddHours(-24) }
The module detects a 32-bit PowerShell session running on a 64-bit OS at load time. When it detects this condition and WOW64 FS redirection is active, it relaunches itself in a 64-bit powershell.exe session automatically:
# The module does this internally — you do not need to call it manually
If ($env:PROCESSOR_ARCHITEW6432 -match '64' -and [IntPtr]::Size -ne 8 -and $env:PROCESSOR_ARCHITEW6432 -ne 'ARM64') {
    Write-Warning '32-bit PowerShell session detected on 64-bit OS. Attempting to launch 64-Bit session to process commands.'
    # ...launches SysNative\WindowsPowershell\v1.0\powershell.exe
}
After the 64-bit session completes, the module prints:
Exiting 64-bit session. Module will only remain loaded in native 64-bit PowerShell environment.
What this means in practice: if you load the module from a 32-bit powershell.exe host (for example, some RMM script runners), the agent commands execute in a separate 64-bit process. Variables and module state from that session are not available in the calling session after the process exits. Always use a native 64-bit PowerShell host when interactive state is needed.

Useful diagnostic commands

CommandWhat it shows
Get-LTServiceInfoFull agent registry object: ID, server, location, version, tray port, base path.
Get-LTServiceInfo | Select-Object ID, Server, VersionQuick summary.
Get-LTError | Select-Object -Last 20Last 20 log entries.
Get-LTError | Where-Object { $_.Timestamp -gt (Get-Date).AddHours(-24) }Errors in the last 24 hours.
Test-LTPortsConnectivity check to all required TCP ports (70, 80, 443 to server; 8002 to mediator).
Test-LTPorts -QuietReturns $True/$False for scripted connectivity checks.
Get-LTProxyCurrent proxy configuration loaded into the module.
Invoke-LTServiceCommand 'Send Status'Triggers an immediate check-in.
Invoke-LTServiceCommand 'Send Inventory'Sends full hardware/software inventory.
Get-LTLoggingReports current agent logging level (Normal or Verbose).
Set-LTLogging -VerboseEnables verbose agent logging (restarts services).
Set-LTLogging -NormalRestores normal logging (restarts services).
Get-LTProbeErrors | Select-Object -Last 20Last 20 probe log entries.
New-LTServiceBackupBacks up agent registry and files before making changes.
Get-LTServiceInfoBackupReads the backup registry data (useful after uninstall).

Build docs developers (and LLMs) love