Synopsis
ReadsHKLM:\SOFTWARE\LabTech\Service into a PSCustomObject. In addition to the raw registry values, the function synthesizes two derived properties:
BasePath— resolved fromHKLM:\SYSTEM\CurrentControlSet\Services\LTService(ImagePath), or falls back to%windir%\LTSVCif the service key is absent or the path cannot be parsed.Server— astring[]built by splitting the rawServer Addressvalue on|, trimming whitespace, and stripping any~prefix characters.
-WhatIf and -Confirm via SupportsShouldProcess. No registry access is performed when -WhatIf is supplied.
If the HKLM:\SOFTWARE\LabTech\Service key does not exist the function writes an error and returns $null.
Syntax
Parameters
Shows what would happen if the cmdlet runs without executing the operation. Alias:
wi.Prompts for confirmation before reading the registry. Alias:
cf.Return Values
Returns a singlePSCustomObject populated from all registry values under HKLM:\SOFTWARE\LabTech\Service (PSPath/PSProvider/PSDrive/PSParentPath/PSChildName are excluded), plus the two synthesized properties below.
Array of server URLs parsed from the raw
Server Address registry value. Entries are split on |, trimmed, and stripped of any leading ~ characters.The agent ID assigned by the Automate server after successful check-in.
The location ID the agent is assigned to on the Automate server.
The resolved filesystem path to the LTSVC directory (e.g.
C:\Windows\LTSVC). Derived from the service ImagePath or defaults to %windir%\LTSVC.The TCP port that
LTSvc.exe listens on for communication with LTTray. Defaults to 42000 when not set.Indicates whether this agent is a Probe agent. A value of
1 means probe mode is enabled.Examples
Basic usage
Select specific fields
Access a single property
C:\Windows\LTSVC.