Removing duplicate XML nodes using powershell

I am working on a script that updates GFI MAX XML configuration files using powershell. As a tangent I had to figure out a way to find and remove duplicate configuration entries. I tried to find a solution on Google, but either my searching skills are too weak or nobody else needs this. I figured I could easily do this myself, as locating a couple of duplicates couldn’t be that hard, could it? This turned out to be a bigger challenge than I expected, so I decided to share my solution in case someone else should need to do something similar. I hope Google picks this up if anyone else should need it.

How to move all your Azure Resources to a new subscription

This is not a technical writeup, as on Azure you cannot move virtual machines between subscriptions yourself, neither in the portal nor via powershell. But that just makes it more important to know that 1) it can be done, 2) how you do it. And your virtual machines will stay running, servicing users all through the subscription change.

Making Autotask API queries from Powershell easier

When you have connected powershell to Autotask you will need to write your queries in QueryXML. To make this a bit easier on myself I use this powershell function:

How to connect to Autotask WebAPI using powershell

Autotask is our MSP tool of choice. It has all the functions we need and then some. One of its more powerful features is a Web Services API. We use it to automatically download and import invoice information into our ERP system and perform some batch updates that would be very bothersome to do manually. I made our invoice import tool in .NET, but batch updates are much easier to do in PowerGUI with Powershell.

Comparing .csv files field by field with powershell

I recently had to move a username & password database from sharepoint to a more secure solution (Passportal). The new service supports .csv import, so I used Access and Excel to prepare the list for export to CSV. Everything seemed to go OK. A .csv file with 1188 records was accepted by the new service and imported.