Synopsis
Attempts TCP connections to all ports required by the Automate agent and verifies that the LTTray port is available locally. Use this before installation to confirm that network access is in place. Ports tested against the server:| Port | Protocol |
|---|---|
| 70 | TCP (Gopher — used by Automate) |
| 80 | HTTP |
| 443 | HTTPS |
| 8002 | TCP to mediator.labtechsoftware.com |
42000) is already in use via netstat. If the port is bound by LTSvc.exe that is reported as normal; if it is bound by any other process it is reported as an error.
When no -Server is supplied the function calls Get-LTServiceInfo to discover the server address. If that returns nothing it falls back to Get-LTServiceInfoBackup. The function accepts server values from the pipeline.
Syntax
Parameters
One or more Automate server URLs to test. Accepts values from the pipeline and from pipeline-by-property-name.Example:
https://lt.domain.comIf omitted, the server address is read from Get-LTServiceInfo (or Get-LTServiceInfoBackup as a fallback).The port that
LTSvc.exe uses to communicate with LTTray. Checked locally to verify availability. If not supplied the value is read from Get-LTServiceInfo; if that also returns nothing the default of 42000 is used.Valid range: 1–65530.Returns a
boolean instead of descriptive text output. Returns $true when the TrayPort is available, $false when it is occupied by another process. When used with -Server, calls Test-Connection against the server and returns immediately.Return Values
Without-Quiet, the function writes string output describing each connection attempt and its result, ending with Test-LTPorts Finished.
With -Quiet, the function returns a boolean:
$true if the TrayPort is available (or the server responds to Test-Connection); $false if the TrayPort is occupied by a non-LTSvc process.Examples
Test a specific server
lt.domain.com and port 8002 against mediator.labtechsoftware.com, then reports results to the console.
Silent connectivity check
$true if the local TrayPort is free, $false if it is in use by another process. Suitable for use in conditional logic.
Test with a custom TrayPort
42001 is available locally.