We (with a little help of Aleksandar ;)) have uncovered an issue in the way export functionality works in PowerGUI 1.5.1 – basically column selection and order may not get preserved newly added nodes and links. This can be pretty frustrating because people importing your powerpack may not get the exact look and feel you had when exporting it.
However, the good news is that you don’t have to wait for our next release to have this fixed. Posted to the script repository is a script which fixes the issue for you!
Basically, in this script, I am taking advantage of the open-source nature of PowerPacks and PowerGUI configuration. Both are just XML files, so I:
- Go through the PowerGUI config file and grab all the column information for each type, and store it in a hash table.
- Then I go through the powerpack file, and if I find a node or a link with no columns specified, I check whether my hash table has info for the type.
- If it does, I create the corresponding XML structure and insert it into the node/link XML element.
So if you are exporting any PowerPacks with version 1.5.1 or participating in the PowerPack challenge, this script may come handy. Just change the filepaths in the beginning of the script and run it.
Here’s the script: update-columnsinpowerpack.ps1 – let me know if you have any questions or issues with it.
Tags: KB, Knowledge Base, Known Issues, PowerGUI, PowerShell