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 -