Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create mailboxes for existing users

Status
Not open for further replies.

markdmac

MIS
Dec 20, 2003
12,340
US
I thought others might benefit from this as well. The following script will query AD for users and create mailboxes for them in Exchange 2007.

Code:
get-user | where-object{$_.RecipientType –eq "User"} | Enable-Mailbox –Database "servername\Mailbox Database" | get-mailbox | select name,windowsemailaddress,database

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Mark is it possible to add

Add-MailboxPermission "user" –User "ME" –AccessRights: FullAccess

to your existing code

get-user –organizationalUnit some OU | where-object{$_.RecipientType –eq "User"} | Enable-Mailbox –Database "server\store" | get-mailbox | select name,windowsemailaddress,database
 
I am sure it can be done, however I am still learning the ins and outs of PowerShell, so not sure how you would pipe it.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Thanks Mark,

Do you have the script that can create bunch of mail enabled users with the same defailt password..

Thank you.
oyazo.
 
I have such a script for vbscript but not PowerShell.

You will need a script that reads a text file of Excel spreadsheet for user details.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top