Public/Application/Get-AutomateAgentInfo.ps1
<#
Copyright © 2024 Integris. For internal company use only. All rights reserved. #> FUNCTION Get-AutomateAgentInfo { [CmdletBinding()] PARAM ( ) $Results = New-Object PSObject -WarningAction SilentlyContinue -Property @{ ServerAddress = (Get-ItemProperty -Path "HKLM:\SOFTWARE\LabTech\Service" -ErrorAction SilentlyContinue)."Server Address" ServerPassword = (Get-ItemProperty -Path "HKLM:\SOFTWARE\LabTech\Service" -ErrorAction SilentlyContinue).ServerPassword ClientID = (Get-ItemProperty -Path "HKLM:\SOFTWARE\LabTech\Service" -ErrorAction SilentlyContinue).ClientID LocationID = (Get-ItemProperty -Path "HKLM:\SOFTWARE\LabTech\Service" -ErrorAction SilentlyContinue).LocationID DeviceID = (Get-ItemProperty -Path "HKLM:\SOFTWARE\LabTech\Service" -ErrorAction SilentlyContinue).ID ProductCode = (Get-ItemProperty -Path "HKLM:\SOFTWARE\LabTech\Service" -ErrorAction SilentlyContinue).ProductCode BasePath = (Get-ItemProperty -Path "HKLM:\SOFTWARE\LabTech\Service" -ErrorAction SilentlyContinue).BasePath Version = (Get-ItemProperty -Path "HKLM:\SOFTWARE\LabTech\Service" -ErrorAction SilentlyContinue).Version LastCheckIn = (Get-ItemProperty -Path "HKLM:\SOFTWARE\LabTech\Service" -ErrorAction SilentlyContinue).LastSuccessStatus } RETURN $Results | Select ServerAddress, ServerPassword, DeviceID, ClientID, LocationID, ProductCode, BasePath, Version, LastCheckIn } |