We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

Create Exchange 2010 Mailbox from Import file CSV

gregurl
gregurl asked
on
Medium Priority
1,395 Views
Last Modified: 2012-05-11
I currently have users with an Active Directory account but no email account.

I would like to use the Exchange command to import a text filefile that would create the email accounts  based on the information in the text file.

The text file would contain the AD username (samaccount), the email address, option for not having email address update on email policy, and the database I will store the user's email account,

What is the command to create the accounts in Exchange?
Comment
Watch Question

Andrew Hancock (VMware vExpert PRO / EE Fellow)VMware and Virtualization Consultant
CERTIFIED EXPERT
Fellow
Expert of the Year 2017
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview

I concurr with hancocka but you don't have to reinvent the wheel.  There are tons of powershell scripts for exchange and AD.

I would highly suggest to look at don jones page.  don jones is known as the "Powershell" Guru. he has written a script for what you want to do using CSV files.

create bulk mailbox users.
http://www.myexchangeworld.com/2010/02/powershell-provisioning-users/
Andrew Hancock (VMware vExpert PRO / EE Fellow)VMware and Virtualization Consultant
CERTIFIED EXPERT
Fellow
Expert of the Year 2017

Commented:
@ActiveDirectoryMan you posted an identical link!

Author

Commented:
I was working on the command to create mailbox for users that already exist in the system. The only part I have not figure out is that I want to set the primarysmtpaddress to firstname.lastname@mydomain.com instead of using the email policy. How do I set the parameters after primarysmtpaddress to use the firstname and last name in the email address?

get-user –organizationalUnit OUNewUsers| where-object {$_.RecipientType –eq “User”} | Enable-Mailbox –Database “DB1” -primarysmtpaddress | get-mailbox | select name,windowsemailaddress,database
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
Andrew Hancock (VMware vExpert PRO / EE Fellow)VMware and Virtualization Consultant
CERTIFIED EXPERT
Fellow
Expert of the Year 2017

Commented:
You need to read the entire article

"the script creates a whole new user, in this scenario, you can change the script to ur need by changing the cmdlet new-mailbox to enable-mailbox"
Commented:
Unlock this solution with a free trial preview.
(No credit card required)
Get Preview
Andrew Hancock (VMware vExpert PRO / EE Fellow)VMware and Virtualization Consultant
CERTIFIED EXPERT
Fellow
Expert of the Year 2017

Commented:
Glad your accounts are enabled.

Author

Commented:
The exact  syntax in the solution fix my exact problem. The other comments did assist in the solution.
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a free trial preview!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.