On Sun, 4 Oct 2009 21:10:36 -0400, "Cary Shultz"
<cshultz@outsourceit.com> wrote:
>1) the organizational unit in which the 185 user account objects reside has
>the following path: "OU=MyOU, OU=Active Accounts, OU=MyUsers, DC= , DC=".
>If I am using the "get-User -OrganizationalUnit" CLI do I simply enter
>"get-User -OrganizationalUnit MyOU"? So, the entire entry to mass mailbox
>enable all of the user account objects in that OU would be:
>
>Get-user -OrganizationalUnit MyOU | Enable-mailbox -Database "EXCHx64\First
>Storage Group\Mailbox Database"
That looks about right.
>2) What happens if someone has already created about 35 of these mailboxes?
>Does it simply tell me that the first 35 failed to be created because they
>already exist and it will create the other 150?
You'll get a failure on the 35 that already have mailboxes. The reset
will succeed. If you want to eliminate the failures (assuming you
don't have any mail-enabled users in the OU), make a small
modification to your pipeline:
Get-user -OrganizationalUnit MyOU | where {$_.RecipientType -ne
'UserMailbox'} | Enable-mailbox -Database "EXCHx64\First Storage
Group\Mailbox Database"
Be cautious with the "get-user" cmdlet -- it'll get "service accounts"
(like IUSR_servername, krbtgt, etc.) into your 'enable-mailbox' stream
if you aren't careful. :-)
---
Rich Matheisen
MCSE+I, Exchange MVP



Bookmarks