Example Python scripts Creating some example Python scripts can show you the various ways scripting can help keep your McAfee ePO servers maintained and up-to-date. Go through these scripts, taken from differing categories of tasks, in this order. Tag systems from a list. Take a tag as input and send a McAfee Agent wake-up call to all systems with that tag. Apply automation to cleaning up disabled ePolicy Orchestrator users. Import computers from an external file and adding them to the System Tree. Export policies and client tasks from one McAfee ePO server and import them into another. Organize your System Tree. These scripts slowly build on each other and the concepts explained. Note: Later scripts don't repeat concepts explained in earlier scripts. Example 1: Tag systems from a list You can learn the basics of writing Python scripts using this example and the ePolicy Orchestrator web API. After showing you the entire script, the individual parts of the script are described in detail. Example 2: Automate repetitive tasks on managed systems You can take a tag name for input and send a McAfee Agent wake-up call to all systems having that tag with this example script. Example 3: Automate user management You use this script to search through all ePolicy Orchestrator users and deletes any marked as "disabled" if they are not administrators. Example 4: Import computers from external sources You can use this script to take a comma-delimited file containing system information, and import those systems into a specified McAfee ePO server System Tree group. Example 5: Import and export data You can export data from an McAfee ePO server and import that data to another McAfee ePO server with a script. Example 6: Automate maintenance of the System Tree You can use this script to reapply System Tree sorting rules to any systems found in the Lost&Found System Tree group.