I recently discovered the AppSense PowerShell API for creating Environment Manager configurations (There is also one for the Management Center, but I haven’t touched it yet). I don’t know for how long it’s been available, but I only came upon it because a customer pointed out a .pdf whose title, “AppSense Environment Manager Configuration API” referenced its existence. This customer also happened to have 350+ printers, and wanted a node for each one. Every node was to contain ostensibly the same set of conditions and actions, so it was a pretty fortuitous discovery and saved me a ridiculous amount of clicking, copying, and pasting.
The document explains in sufficient detail how to use the API and can be downloaded from MyAppSense.com (Requires login), but the commands themselves are fairly clean and easy to work with. For our needs, I wrote an AutoHotkey script which in turn generated a .PS1 PowerShell script (which ended up being roughly 3000 lines!). This was able to map out all of their printers while saving me a lifetime of arduous GUI navigation. That being said, it worked just as well as if I done exactly that. Actually, it destroyed the possibility of human error for individual nodes, so it probably worked even better.
The Appsense PowerShell API is only capable of generating new configs (and not modifying existing ones), but this is overcome simply by generating the nodes and subnodes you want and then copying and pasting them into your primary configuration. Here’s a piece of the script I generated (made generic to a point). Note: PasteBin link, opens in a new window.
It’s just a matter of designing an object with its respective parameters and then adding it as a child of a given parent (the parent can be a node, sub-node, action, or condition–your call). The above will add a node called Windows Printing, give it a sub-node called Printer 1, and populate that sub-node with a condition that checks the client’s computer group, an action that maps the appropriate printer, a condition to check a secondary AD group, and then an action to set it as default. Finally, it saves the config for your use.
The AppSense PowerShell API document will go into a fuller explanation of what each string and boolean defines, but hopefully this gives you something of a skeletal representation of a configuration-generating PowerShell script.