ConnectWise Automate agents are client applications that run as a service on a computer and enable it to report into your [[ConnectWise Automate]] server for reporting, monitoring, [[ConnectWise Automate Scripts|script execution]], etc. Computers running the Automate agent are sometimes referred to as agent computers, remote computers, or just remotes.^[[ConnectWise Automate Agent Deployment - ConnectWise](https://docs.connectwise.com/ConnectWise_Automate_Documentation/040)]
# Effective Policy
The Effective Policy tile of the Computer Management screen displays the set of policies that are currently applied to the agent. The information includes contact details, passwords, groups, agent templates, agent schedules, scripts, software scripts, monitors and patching information.^[[Effective Policy Tile - ConnectWise](https://docs.connectwise.com/ConnectWise_Automate_Documentation/070/060/110)]
# Templates
Agent templates pertain to agent configurations and are used to apply certain rules to sets of computers.^[[Agent Templates for Automate - ConnectWise](https://docs.connectwise.com/ConnectWise_Automate_Documentation/060/020)]
# Troubleshooting
## Log Files
`C:\Windows\LTSVC\LTErrors.txt`
These logs can help identify installation/connectivity errors with the **Automate Agent**.
## Agent Service not running
Resource Monitor -> Find LTSVC.exe -> End process
# Offboarding
## Retire
Agent machines that you no longer want to manage (e.g., agent is at end-of-life) can be retired after the agent has been removed. Retiring an agent also frees up its license. Be sure to remove an agent by running the offboarding script or uninstalling the agent before retiring the asset.^[[Retired Assets in the Control Center - ConnectWise](https://docs.connectwise.com/ConnectWise_Automate_Documentation/070/220)]
> [!Note]
> Ensure the agent is fully removed from an endpoint before the agent is retired. If an agent is retired before it is fully removed, it continues to check in but remains a retired asset.
## Uninstalling the Agent
> [!Note]
> If you are reinstalling Windows on the same computer you should not need to retire/offboard. It should match on MAC and resend everything once onboarded again.
### Uninstall Command
Select **Commands** > **Remote Agent** > **Uninstall Remote Agent**. The next time the agents check in, the uninstall command will run.^[[Uninstalling the Automate Windows Agent - ConnectWise](https://docs.connectwise.com/ConnectWise_Automate_Documentation/070/020/010)]
### Generic Uninstaller
1. In the Web Control Center **System** > **Installers** > **Generic Agent Uninstaller**.
# InstallerToken
## DarenWhite99's Script
Creates an Installer Token. The maximum token lifetime is just over 1 year.
Parameter Variables:
TokenReason: Purpose for Token Creation. Default is "Script \<SCRIPTID>, requested by \<USER>"
InstallerType: 1=Windows MSI, 2=Windows EXE, 3=Linux x86, 4=Linux x86_x64, 5=macOS
ValidityPeriod: Amount of time the token is valid, as X UNITs. (5 DAY, 2 MONTH, etc.) Default is 1 day. Integer units of SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, QUARTER, YEAR are supported.
TargetLocationID: LocationID for the installer. Default is the LocationID for this computer.
Return Variables:
ExpirationDateUtc: Token Expiration Date String
InstallerToken: Generated Token
InstallerTypeID: InstallerTypeID for the token
TargetLocationID: LocationID for the token
Darren White - Apex Technology Management - v1.4.1 - 20200708
Created 20200619