Skip to main content

Agent ID assignment discrepancy Autofix

Summary

This script will reinstall the Automate agent for machines that are checking into Automate with the same agent ID as another agent. It will create a ticket if it fails to reinstall the agents with a new agent ID.

Additionally, it will work reliably only for customers where Mac Signup Matching is not enabled.

Image

Sample Ticket:
Image

How To Use

Dependencies

Variables

NameDescription
OnlineIndicates if the agent is online in CW Control
CommandThe command to issue to the endpoint to perform the reinstall
CidCurrent Computer ID
CNameCurrent Name of the Computer
CLocalAddressLocal IP Address
CRouterAddressRouter/Public Address
AnotherAgentDistinct Names of the agents checking into the same Computer ID
NewAgentIDNew Agent ID of the machine after successful reinstall
CommentComment to add to the ticket
SubjectTicket Subject
TicidTicket ID

Process

  1. Determine whether the computer is offline or online in Control.
  2. Attempt to reinstall the agent.
  3. Determine whether the installation was successful by verifying the presence of a new Computer ID for the same machine.
  4. Create or comment on a ticket for failure and finish any open ticket for success.

Output

  • Ticket
  • Script logs