View all Worklets
Windows

Windows - Maintenance Tasks - Cleanup Disconnected Automox Devices

Purges disconnected Automox endpoints after specified number of days.

Worklet Details

Introduction to the PowerShell-Based Windows - Maintenance Tasks - Cleanup Disconnected Automox Devices Worklet

In the daily tasks of managing an Automox environment, IT professionals prioritize building and maintaining a responsive device landscape. One of the challenges in this task is handling disconnected devices, especially those that have been inactive for a more extended period.

The Windows - Maintenance Tasks - Cleanup Disconnected Automox Devices Worklet addresses this problem. This PowerShell-based task-automator utilizes the Automox API to search for devices that have been disconnected for longer than the user-specified duration (in days), and purges them from the specified Automox zone.

Why would you use the Cleanup Disconnected Automox Devices Worklet?

Managing and maintaining a clean device inventory requires regular updating and checking. Devices that are disconnected for an extended period are often overlooked and can clutter the device overview. Besides making the device management process disorganized, such disconnected devices can also skew data analysis, creating a need to update manual cross-checking and view constraints. 

The Cleanup Disconnected Automox Devices Worklet aids in these scenarios, automatically identifying and eradicating outdated disconnected devices, streamlining maintenance tasks, and providing an accurate view of your Automox zone.

Components of the Cleanup Disconnected Automox Devices Worklet

This Worklet includes three primary elements: the Automox Organization ID (orgID), the number of days (ageLimit) a device can be disconnected before cleanup, and the dryRun, which controls whether the script merely identifies or also deletes non-compliant devices. 

The orgID defines the targeted Automox zone, and the ageLimit, set to default at 120 days, can be adjusted according to the users unique requirements. 

How does the Windows - Maintenance Tasks - Cleanup Disconnected Automox Devices Worklet work?

Once the Worklet is running, it starts by querying the specified Automox zone for disconnected devices. If a disconnected device does not carry a valid last disconnect time, the Worklet simply skips it. For other devices, the Worklet calculates the time delta between the current time and the last disconnect time and checks if the duration exceeds the ageLimit. 

If the dryRun mode is enabled when running the script, identified devices are flagged but not deleted. Through these steps, the Worklet ensures that only pertinent devices, i.e., those that have remained disconnected for longer than the specified date, are considered for cleanup.

What is the expected outcome when you use the Cleanup Disconnected Automox Devices Worklet?

Implementing the Cleanup Disconnected Automox Devices Worklet leads to an organized and up-to-date device overview. This outcome considerably aids in maintaining a clean device inventory, further reducing errors in data analysis and mitigating the possibilities of overlooking disconnected devices. 

Whenever the Worklet identifies and removes disconnected devices, it can be seen as an update service that maintains the accuracy and efficiency of the Automox platform inventory.

View in app

Consider Worklets your easy button

What's a Worklet?

A Worklet is an automation script, written in Bash or PowerShell, designed for seamless execution on endpoints – at scale – within the Automox platform. Worklet automation scripts perform configuration, remediation, and the installation or removal of applications and settings across Windows, macOS, and Linux.

do more with worklets