Home » Exchange 2010

How to Bulk Create and Modify User Accounts in Exchange Management Shell. Using Custom Attributes to Create Dynamic Distribution Groups.

Bulk Creating and modifying user accounts in Active Directory is a common task which every administrator has met or will meet at some point of his career. Normally, if you are not a programmer or do not have extensive experience with PowerShell, you can get confused among the myriad of script examples published on the Internet. When you add in the different modules and versions of PowerShell, performing bulk operations in Active Directory becomes a scary and difficult task.

In this Step-by-Step Screencast, we will give you a simple algorithm which will allow you to perform easily bulk operations in Exchange Management Shell. We do not expect you to have any programming or PowerShell experience.

As you will see, there are two parts in this algorithm :
– a CSV (Coma-separated Values) text file with the accounts’ information
– a PowerShell script, which uses the data from the CSV file

We do not expect you to have any experience with CSV files too, so you can see how to create a CSV file from scratch, and how to modify it according to your needs.
We repeat this algorithm three times – each time showing you how to change both the script and the CSV file, so you can get a better understanding of the whole process and feel more comfortable doing it by yourself later. The examples demonstrate the cmdlets New-Mailbox, Set-User and Set-Mailbox. Once you grasp the idea behind it, you can use this approach for bulk operations with any cmdlet.

It is very possible that at some point you will feel the need to add information about your users that does not easily fit into the existing fields. Our last example is about modifying Exchange Custom Attributes and using them when creating Dynamic Distribution groups in Exchange Server 2010.

For your convenience, we have published the PowerShell scripts and CSV file used in the Screencast –
bulk-modify-mbx.ps1, bulk-modify-mbx.ps1, bulk-modify-custom1.ps1, NetoMeter.csv

Click to play 1 video
Step 1 We start by creating a simple CSV file, based on a first name/last name list. Then, we add only the minimum account information necessary for our demonstration and discuss the bulk-create-mbx.ps1powershell script.

Click to play 2 video
Step 2 In this step, you can see the PowerShell script for bulk creating mailbox enabled users in action. We also demonstrate how to modify the data from the CSV file in the script and set the users’ aliases according to your company policy.

Click to play 3 video
Step 3 Once you have the user accounts created, you might need to populate or modify their information. This can be done easily with the bulk-modify-mbx.ps1powerShell script.

Click to play 4 video
Step 4 Finally, we demonstrate the use of Exchange Custom Attributes. They can be used to create filters for e-mail address policies, address lists, and dynamic distribution groups. After the custom attributes for some of the accounts are populated, we create a Dynamic Distribution Groups in Exchange Server 2010.

NetoMeter Screencasts

Step-by-Step Video Tutorials

Useful Links

netometer logo

Edtior's Picks

Latest Articles

©2024 NetoMeter All Right Reserved.