Link to home
Start Free TrialLog in
Avatar of Michael_Griffith
Michael_GriffithFlag for United States of America

asked on

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?
Avatar of florin_s
florin_s

Hi,

here is what I have foud:

http://www.visualbasicscript.com/m_61934/tm.htm
ASKER CERTIFIED SOLUTION
Avatar of AmitTank
AmitTank
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Michael_Griffith

ASKER

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!
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 " ","")}
My Pleasure, Mike... :)
I totally missed that I was talking to the same person. How funny! Thanks again!