All Forums >> [Scripting] >> Windows PowerShell >> Find Exchange 2007 Public Folders with trailing spaces Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
We had a couple hundred Public Folders (PF) on our Exchange 2000 server. These all needed to be migrated to the Exchange 2007 server. I added the Ex2007 server as a replica to each PF and waited about a week while the replication took place. While reading http://msexchangeteam.com/archive/2007/06/25/445429.aspx to learn how to remove the Ex2000 server from the replication list, I found that a number of the PFs had trailing spaces upon them; Ex2007 doesn't like this at all. I whipped up this one-liner to list out which PFs had this problem so I could manually correct it. This run successfully on my Ex2007 SP1 server within the Exchange Management Shell.
I know this pales in comparison to some of the VBS stuff I churned out in the past, but I am brand spanking new to PowerShell. Start small, work my way to gargantuan.