Home > Exchange 2007, PowerShell > Bulk User mailbox creation in Exchange 2007

Bulk User mailbox creation in Exchange 2007

While working on setting up my test Exchange 2007 setup, I got a requirement to create 100 users in my environment. I know how to do it with Vbscript but creating mailbox enabled users increases the complexity of script a bit. Then I explored PowerShell and came up with below piece of code. It might help you too… :-)

[PS] C:>$password = Read-Host “Enter the password” -AsStringString
[PS] C:>foreach ($number in 1..100) { new-mailbox -name user$number -Alias user$number -database “MBX1SG1S1″ -organizationalUnit “SPDOMAIN.COM/INDIA/Users” -UserPrincipalName user$number@spdomain.com -Displayname User$number -password $password }

Please note that, the password will be applied for all 100 test accounts we are creating. Above code creates 100 test user accounts with mailbox enabled on MBX1
SG1S1″ store.

Happy Learning..,
Sitaram Pamarthi
Categories: Exchange 2007, PowerShell
  1. kns
    May 4, 2010 at 1:56 pm | #1

    Hello Sitaram
    I have already created the bulk exchange 2007 mailboxes. I am now trying to create the ‘AD Home folders’ for these mailboxes/users. Would you have any idea how I can get this done easily? Thanks for your helpful post.

  2. May 12, 2010 at 10:36 pm | #2

    Kns, are you trying to map a drive for users? Could you please route me to the setting you want to configure? Probably I will be able to help you.

  1. No trackbacks yet.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>