Add mailbox via powershell
Hi, i've written a gui around powershell to create users and there mailboxes. I first creating the user and after that i make the mailbox. I will run my tool from behind my worstation Command: enable-Mailbox -Identity OurDomain\PUK -Database "OurExchangeServer\First Storage Group\Mailbox Database" But the command returns a error: Enable-Mailbox : The Name property contains leading or trailing whitespace, which must be removed. At line:1 char:15 + enable-Mailbox <<<< -Identity andreas\PUK -Database "OurExchangeServer\First Storage Group\Mailbo x Database" + CategoryInfo : InvalidData: (OurDomain/A...n/Puk P. VanDe :ADObjectId ) [Enable-Mailbox], DataValidationException + FullyQualifiedErrorId : E7473FB4,Microsoft.Exchange.Management.RecipientTasks.Enab leMailbox What am i doing wrong i dont get it because i've used this command before to create mailboxes without any problem. What ever i try i cant get it to work anymore :( Jos
March 18th, 2011 11:12am

That's by design you need to fix those accounts first, having leading or trailing white space is not rfc compliant. How to Remove Spaces From Recipient Aliases by Using the Exchange Management Shell http://technet.microsoft.com/en-us/library/bb851499(EXCHG.80).aspxJames Chong MCITP | EA | EMA; MCSE | M+, S+ Security+, Project+, ITIL msexchangetips.blogspot.com
Free Windows Admin Tool Kit Click here and download it now
March 18th, 2011 11:30am

Hi, You could test to enable a single recipient mailbox without space in alias first. If you can enable his mailbox with your code, It should be the issue.Please remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
March 21st, 2011 11:37pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics