Solved

Bulk accont & mailbox creation

Posted on 2010-11-28
7
836 Views
Last Modified: 2012-05-10
Hi-

I need to find the fastest AND easiest way to create about 30 Active Directory accounts with associated mailboxes on a Win Server 2008 server running Exch2007 SP1. Furthermore, I need to also create separate e-mail contacts which will point to my client contractors’ external  (SMTP) mailboxes; these users are all located at Gov't sites and also have a .gov e-mail address, in addition to these internal addresses I need to create. To be clear, I assume this will be a separate import process (#1 – create new internal user mailboxes for all 30 users….#2 – create SMTP mail contact in Exchange for the same 30 users)
Could the respondent to my query give me clear instructions on how to do this? Please do not point me to other sites that claim to know how to do it, since I am pretty technical, have followed the leads I have found already, but I keep getting error messages in the Exch Mgmnt Shell when I try to import the CSV file I created based on instructions I found. So, rather than trying to fix what's not working, can you please send me a fully functional CSV file (or paste headers here) AND the proper ExShell syntax for BOTH of these tasks? It's ok if all accounts have the exact same password, though I want to make sure they these newly created accounts are NOT flagged with a “User must change password at next logon” - we have actually found that creating accounts this way does NOT allow OWA users to even log in the first time, since this is the only way that remote users access their internal mailbox from afar using OWA.

Can you help with working CSV headers (and an example row) to do both of these imports into the Ex (power) shell?

Thanks in advance.
Brian
0
Comment
Question by:ethernet69
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 19

Expert Comment

by:suriyaehnop
ID: 34231272
To create bulk mailbox:

CSV format:

Name      Fistname      Lastname      Alias      Account      Database      Org      Primary      Company


To create bulk contacts:
Import-Csv "C:\new user.csv" | foreach { New-Mailbox -Name $_.Name -FirstName $_.firstname -LastName $_.lastname -Alias $_.alias -SamAccountName $_.sameaccount -Initials $_.initial -Database $_.database -OrganizationalUnit $_.org -UserPrincipalName $_.primaryaddress -Password $temp -ResetPasswordOnNextLogon:$false }

Open in new window

Import-Csv c:\ste.csv | foreach { New-MailContact -FirstName $_.firtname -LastName $_.lastname -Name $_.Name -Alias $_.alias -ExternalEmailAddress $_.mail -OrganizationalUnit $_.OU }

Open in new window

Create-bulk-Mailbox.csv
Create-Bulk-Contacts.csv
0
 

Author Comment

by:ethernet69
ID: 34235695
I also need to specify the OU to which the new user(s) belong when creating the AD account and mailbox via the PowerShell script. How does this change the script and the CSV headers? Can you give an example of the headers in line 2 of the CSV?
0
 
LVL 19

Expert Comment

by:suriyaehnop
ID: 34236864
Import-Csv "C:\new user.csv" | foreach { New-Mailbox -Name $_.Name -FirstName $_.firstname -LastName $_.lastname -Alias $_.alias -SamAccountName $_.sameaccount -Initials $_.initial -Database $_.database -OrganizationalUnit $_.org -UserPrincipalName $_.primaryaddress -Password $temp -ResetPasswordOnNextLogon:$false

This script include Organizational Unit.

Here is what CSV look like..
Create-bulk-Mailbox.csv
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

Author Comment

by:ethernet69
ID: 34238313
Thank you Suriya....what does the "org" classification do? How is "org" different from adding them to the correct "OU" during import?
0
 
LVL 19

Expert Comment

by:suriyaehnop
ID: 34245945
The "org" is just excel header name. You can put another name. Let say that, you want to put 2 new user to different OU, in org column, you have specigy the path for that OUs. please refer to excel sheet.

      

Name	Fistname	Lastname	Alias	Account	Database	Org	Primary	Company
Suriya	Suriya	Eh Nop	suriya	Suriya	Server01\SG3\DB3	contoso.com/North OU/marketing	suriya@contoso.com	
User 01	User	1	user01	user01	Server01\SG3\DB3	contoso.com/South OU/sales	user01@contoso.com

Open in new window

Create-bulk-Mailbox.csv
0
 

Author Comment

by:ethernet69
ID: 34247403
Thank you....what would be the proper syntax (in the PS script, as well as the import file) to add a user to a distribution list during the mailbox creation process?
0
 
LVL 19

Accepted Solution

by:
suriyaehnop earned 500 total points
ID: 34253997
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Archiving/Deleting Old E-Mail boxes 4 57
NLB +DAG 8 56
Unable to create lists in Exchange 2013 1 34
exchange 2013 10 39
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
Find out what you should include to make the best professional email signature for your organization.
In this video we show how to create an Accepted Domain in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Ac…
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question