Ivanti Environment Manager Configuration: How to export Shortcuts, Drive Mappings and Printer Mappings with Powershell

Recently, I got asked by one of my customers if there is a way to extract information from Ivanti (Appsense) Environment Manger configuration that could be used somewhere else. This client has been using Ivanti UWM for years which accumulated large numbers of shortcuts creation actions, mapping actions and printer creation actions.

The customer also wanted to know the associated AD group condition upon which the user would get the action triggered. Example in the screenshot below.


Unfortunately, there is no built-in way in the console to export a certain node or action by type. So we had to improvise and find a way around that situation.

EM configuration file (*.aemp), is in reality a collection of XML files and one SDF file to track history changes. Unzip the file using your preferred method:


The XML file we are after is Configuration.xml which has all the actions, conditions, nodes, etc…


Looking inside the XML, the structure is far from readable and may vary based on how well the configuration was being maintained. I have seen configurations where lots of outdated, redundant and unnecessary actions where their let alone disabled actions that were left uncleaned. 


Powershell to The Rescue!

We don’t know all the names of the nested properties in an XML file, however, with a quick search in the configuration we can see how Ivanti named the properties that we are after:

Drive Mapping Action: “UEM.Action.Drive.Map”

Printer Mapping Action: “UEM.Action.Printer.Map”

Shortcut Creation Action: “UEM.Action.Shortcut”

For conditions where the user is checked against an AD group membership, the property name is “UEM.Condition.UserGroupMembership”

Armed with this information, I wrote a recursive Powershell script that would scan all the nodes inside an XML files and evaluate them against the above names as required.


How Does It Work?

The script starts by importing the contents of the XML file into an XML object.

Then an empty array is created and the recursive function is called with the appropriate parameters

So if the function is called with “Shortcuts” parameter the result will be something like this


Lastly, script will save the output into a CSV file placed in the same location as the script for analysis/use.

Full code

 

Ivanti Environment Manager Configuration: How to export Shortcuts, Drive Mappings and Printer Mappings with Powershell
Tagged on:             

One thought on “Ivanti Environment Manager Configuration: How to export Shortcuts, Drive Mappings and Printer Mappings with Powershell

  • September 6, 2021 at 3:04 pm
    Permalink

    Thanks for the post! We’re having issues with drive mappings – our configuration has conditions (map drive for this group of users, but don’t map if username or usergroup is #value). It’s a real mess! Unfortunately your script doesn’t handle conditions like this 🙁

    Reply

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from Amir Sayes

Subscribe now to keep reading and get access to the full archive.

Continue reading