If it does not find a valid csv, it will go ahead and reach out to the server. This is to improve speed, allow for editing of CSVs, and reduce load on the server. If you run it again on the same day, it will search for valid CSV files first before reaching out again to the server.
Once you run any of the “get” actions, it will save the data to several csv files located under C:\UEM-Maintenance\\.
This script connects to your VMware Workspace ONE UEM environment and gets duplicates, stale records, or problematic devices (devices with invalid serials). To download it, click “Raw” then right-click and “Save As”. The script is available on Github: Start-UEMMaintenance.ps1. I took an internal script developed by our VMware IT system admins and modified it for external use so that you can easily clean up device records using WS1 REST API. This happens due to normal attrition of devices, re-imaging, and device resets. Without regular maintenance, you could potentially have thousands of records that are no longer valid and will affect the reporting of your deployments.
Over time duplicate and stale device records, especially for Windows 10, can grow and grow. Keeping a clean and healthy environment is important when managing a large number of devices in Workspace ONE UEM.