AutomoxAutomox

Ansible Playbook - Removal of device from console/Uninstall Agent

Westyy
February 13, 2025 at 1:41 am UTC
#agent#automox#third-party

Hey guys,

 

Been a hot minute since I’ve hit up this community. Hope everyone is well! :)

 

I understand there is a playbook for installation of the agent however I was wondering if over the years, someone has developed the reverse? Just looking to make our VM decommission process a little streamlined. Anyone know if there are any playbooks about that can cover removal of the device in the console and agent removal?

Typically we just nuke the VM so uninstall isn’t really a major requirement but would be good if we could remove the device from the console.

My Google-fu hasn’t had much success in landing any positive hits so figured I would try here.

 

Thanks in advance!

 

Westyy

This discussion is archived and closed to replies. Continue it in the Automox Community Slack.

Discuss on Slack

Replies (3)

MarkH-AutomoxFebruary 14, 2025
#1

Hi Westyy,

I can’t test this at the moment but in a nutshell you can issue a singular command (or a playbook) containing an offboarding ‘--deregister’ command. This could be a task in ansible (heres our deployment playbook as an example). Either way if you run ‘amagent --deregister’ it will offload it from the console. 

Deregistering it will not uninstall the agent but if you are destroying the VM it would be enough to just get it out of the console automatically first.

Regards,

WestyyApril 16, 2025
#2

Hey Mark

 

Thanks for getting back to me and apologies for taking 2 months to reply.

Curious is there a deregister flag equivalent for Windows as well?

 

Cheers!

 

MarkH-AutomoxApril 16, 2025
#3

Hi Westyy,

The command is the same for all versions of OS. Some more details and other commands you can locally run are found here: https://docs.automox.com/product/Product_Documentation/Agents/Agent_Installation/Agent_Command_Line_Guide.htm#DeregisteringaDevice