Import the module
The fastest way to load the module is to download and execute it directly from the LabTech Consulting shortlink. No file is saved to disk; the module is loaded into the current session only.
This command evaluates the module source in-memory. If you need to load it from a local file instead, see the Installation page.
Verify the module loaded
Confirm the module is available by pulling the current agent registry information. If the agent is not yet installed, the command returns When no agent is installed you will see:That error confirms the module is loaded and working. To verify the module version directly:
$null and emits an informational error — that is expected at this stage.Install the agent
Call
The installer retries the MSI up to three times if
Install-LTService with your server URL, server password, and target location ID. The function downloads the agent MSI from your server, runs the installer, and waits up to three minutes for the agent to register.| Parameter | Required | Description |
|---|---|---|
-Server | Yes | URL of your LabTech server. Bare hostnames and http:// are also accepted; https:// is prepended automatically if omitted. |
-ServerPassword | Yes (or use -InstallerToken) | The server password from SELECT SystemPassword FROM config; in the Automate database. |
-LocationID | No (defaults to 1) | The numeric location ID the agent should appear under. |
-InstallerToken | Alternative to -ServerPassword | A deployment token from the Automate Deployment page, for tokenised MSI installs. |
LTService does not appear after the first run. On success:Confirm the install succeeded
After the installer exits, read the agent’s registry values to verify it registered correctly.Successful output includes the agent ID, server address, and location:You can also confirm the Windows services are running:Both services should report
Running.Restart the agent service
To restart the agent after a configuration change, use On success:To stop or start services independently:
Restart-LTService. It stops LTService and LTSvcMon, waits for the Stopped state, then starts both services and waits for Running. After startup it automatically sends a Send Status command so the agent checks in with the server immediately.Troubleshooting
Agent installed but did not register within 3 minutes: The install completes butGet-LTServiceInfo shows no ID. Check that the machine can reach the LabTech server on HTTPS, then restart the agent:
Install-LTService automatically calls Uninstall-LTService when it finds leftover files or registry keys under HKLM:\Software\LabTech\Service or in %windir%\LTSVC. To trigger this manually:
Redo-LTService reads the current registry settings, uninstalls the agent, and reinstalls it in one command: