Contact Master–Bulk Import of Mail Enabled Contacts for Exchange 2007 and 2010…
This article has been updated to reflect a slightly revised version of the Application. The old version did not correctly load the Exchange 2010 Management Agents. The version has been updated to 1.0.1 – if you downloaded the old version (1.0) and are running Exchange 2010 – please download and install the new version of the tool.
I have been working with a friend recently to bulk import a number of Mail Enabled contacts into a new Exchange 2007 environment that he has setup. Now this should not be the most difficult of processes – as by using Powershell – it should be relatively easy process to import each contact into the Directory from a CSV file.
However on this occasion – it proved to be a little tricky for a couple of reasons;
- Although my friend is a very experienced IT professional, he has not worked hugely with Powershell – therefore some of the initial scripts to perform the import contained some errors that he needed assistance in fixing
- The source CSV file that he was working from, contained a number of formatting errors and duplicates that needed removing or fixing before the end script would work
This whole process got me thinking, that whilst Powershell is an exceptionally Powerful tool for Exchange Administration – it can be very daunting for people whom are not used to a shell scripting language and from assumption – creating bulk contacts in Exchange 2007 and 2010 is a fairly common task.
Therefore I decided to write a simple tool that performs CSV Mail Enabled contact Imports via a GUI (Contact Master) – but also gives the admin the Powershell code – this can be used as a learning tool, as well as help get the job accomplished.
The tool is compatible with both Exchange 2007 and Exchange 2010.
In order to run Contact Master this host machine must meet the following software specifications:
- Windows XP x64, Windows Vista x64, Windows Server 2003 RTM or R2 with SP 1 or higher x64, Windows 2008 RTM or R2 with Service Pack 1 or higher x64
- .NET Framework 3.5 or higher
- Powershell Version 2.0
- Quest AD CMDlets installed – download from: http://www.quest.com/powershell/activeroles-server.aspx
- Exchange Management Tools Installed
You can download Contact Master from the following location:
When you have downloaded the setup file – double click on the “ContactMasterSetup.msi” file:
You will then be presented with the welcome screen within the setup wizard – you should click on the “Next” button to continue – see below
You will be asked where you would like to install the application binary files – either choose a location which suites you – or accept the defaults – when done – click on the “Next” button – see below
You will be given the chance to review you selections – when happy click on the “Install” button – see below
After a short install – you will be presented with the “Completing Install” screen – click on the “Finish” button
Configuring the Source CSV file
Before using Contact Master you should ensure that you have setup the CSV file that you intend to use with the program correctly. Contact Master expects the following fields (or headers to be present in the CSV file):
Of which the following fields are mandatory – e.g. MUST have values for each entry:
Therefore a good example of a compatible file would look like:
You have the option of NOT supply values for FirstName,LastName and Initial – but you MUST have the headers present within the CSV file – for example;
I recommend that you use a program like Microsoft Excel to generate your CSV file as you can take advantage of a number of features such as concatenation as well as having a good environment to control the layout of the file and the export it to CSV.
Using Contact Master
Contact Master can be started from your Desktop or via the Start Menu – see below
When the application has loaded you will be presented with the following screen:
The first thing that you should review when the program has loaded is the “Status” area – this will give you important information about dependencies that the tool relies upon. If everything is OK on the host system the status Window Should look like the following:
However if there is a problem – you will see a message like the following:
If you have a problem like the one above – you will need to correct it before you can continue using the tool, if you are running Exchange 2010 and see that the Management Shell is not installed – ensure that you TICK the “Running Exchange 2010” check box – this should correct the error (unless of course you are running 2010 but have not installed the correct Management tools on your host machine).
You should NOT have to tick the “Running Exchange 2010” checkbox if you are running 2007
Assuming that everything is OK – the first step is to select the Organizational Unit that you wish for your contacts to be placed within. This is done by using the Active Directory tree picker that is located on the left hand side of the screen.
It is VERY important that you select an OU rather than a container – selecting anything other than an OU will cause the program to generate an error.
You can select an OU using the Mouse – see below
When you are happy with your Selection click on the “Lock OU” button – this will enable the “Import” button – and update the status of the Selected OU to reflect what you have chosen – see below
When you are happy with your selection – click on the “Import” button – this will present you with a Open File dialog, here you will need to supply the location of your Import CSV file – see below
When you click on the open button – the program will then being the Import of the Contact entries into the Directory – when this has finished you will see that the “Powershell Script” and “Log Window” areas have changed to reflect the processes that have take place – see below
If you now check the destination OU within AD, you should see all of your Contacts have been created. You can also use the Output in the “Powershell Script” area to modify your own custom scripts should you need to.
I hope that you all like this tool – and I would also like to credit Marc Merritt for his AD Picker Control.