Skip to content

Commit

Permalink
Add sample script to generate 1000 mailboxes quickly. Tested with
Browse files Browse the repository at this point in the history
Microsoft Exchange 2007.
  • Loading branch information
jkerihuel committed Jun 10, 2014
1 parent e8aeaa3 commit d9fbe39
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions script/CreateMailbox.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#########################################
#### Automatically create mailboxes #####
#########################################

### define the password to use for all mailboxes
$password = Read-Host "Enter Password" -AsSecureString

### define the template username portion to use
$user = "user"

### define the FQDN
$fqdn = "exchange2007.local"

### database
$database = "First Storage Group\Mailbox Database"

### OrganizationalUnit
$ou = "exchange2007.local/Users"

### define start ($i) and end ($end)
$i = 1
$end = 1000


################## DO NOT EDIT FROM HERE #######################

do {

$upn = $user + $i + "@" + $fqdn
$name = $user + $i

new-mailbox -Password $password -Database $database -UserPrincipalName $upn -Name $name -OrganizationalUnit $ou;
$i++;

} while ($i -le $end)

0 comments on commit d9fbe39

Please sign in to comment.