Exchange 2007 & script

Arabsoft
Arabsoft used Ask the Experts™
on
Dear all,

we need your help to find a script that create a mailboxes for the existing users in active directory. we will use exchange 2007 as mail system. the creation for mailboxes will be from exchange server.

thanks
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
This is an extraction from the online help. The topic is "How to mailbox enable an existing user"

Enable-Mailbox john@contoso.com -Database "MyServer\First Storage Group\Mailbox Database"

Then there's the bulk create:
http://msexchangeteam.com/archive/2006/09/05/428833.aspx

Scenario: Bulk create mailboxes based on a CSV file

Shell one-liner:

The following one-liner creates mailboxes for all team members listed in an Avalanche.csv file, which contains NHL Avalanche team roster information with the following column format:
    Pos,No,Player,Age,Ht,Wt,Born,Exp,Birth City
$password = Read-Host "Enter password" -AsSecureString
import-csv Avalanche.csv | foreach {new-mailbox -alias "avalanche$($_.No)" -Name $_.Player -password $password -database "Mailbox Database" -org Users -UserPrincipalName "avalanche$($_.No)@example.com"}

Obviously it's a lot busier than you possibly want but at least you can take the concept and adapt it for your need.


Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial