How do I use Exchange Power Shell to remove spaces from the aliases of mail enabled public folders?

When I look at the properties of several of my public folders that were replicated from Exchange 2003 I get the following error:

The properties on 'Made Up Name' have invalid data. If you click OK, default values will be used instead and will be saved if you do not change them before hitting Apply or OK on the property page. If you click cancel, the object will be displayed read-only and corrupted values will be retained.

The following values have invalid data:
Alias.

I found an article on TechNet (http://technet.microsoft.com/en-us/library/bb851499.aspx) that describes how to remove spaces from mailbox aliases but what command would I use to do the same thing for public folders?
Michael_GriffithAsked:
Who is Participating?
 
AmitTankCommented:
You can find a syntax for mailbox alias, group and public folder also in below thread...

http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=3724026&SiteID=17

Hope this helps you...!!!
0
 
florin_sCommented:
Hi,

here is what I have foud:

http://www.visualbasicscript.com/m_61934/tm.htm
0
 
Michael_GriffithAuthor Commented:
The link didn't take me to the answer at first but I posted the same question there and got the answer I needed. Thanks for the link!
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Michael_GriffithAuthor Commented:
For anyone interested here is the answer:

Get-PublicFolder -identity "\" -Recurse -ResultSize Unlimited | Get-MailPublicFolder | Where {$_.Alias -like "* *"} | ForEach-Object {Set-MailPublicFolder $_.identity -Alias:($_.Alias -Replace " ","")}
0
 
AmitTankCommented:
My Pleasure, Mike... :)
0
 
Michael_GriffithAuthor Commented:
I totally missed that I was talking to the same person. How funny! Thanks again!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.