Book Image

Microsoft Exchange Server Powershell Cookbook (Update)

Book Image

Microsoft Exchange Server Powershell Cookbook (Update)

Overview of this book

Table of Contents (21 chapters)
Microsoft Exchange Server PowerShell Cookbook Third Edition
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Creating recipients in bulk using a CSV file


One of the most common bulk provisioning techniques used in the Exchange Management Shell makes use of CSV files. These files act like a database table. Each record in this table is represented by one line in the file, and each field value is separated by a comma, which is used as a delimiter. In this recipe, you'll learn how to set up a CSV file and create recipients in bulk using the Exchange Management Shell.

Getting ready

In addition to the Exchange Management Shell, you'll need to use Microsoft Excel to create a CSV file.

How to do it...

Let' see how to create recipients in bulk using the following steps:

  1. We'll enter some data into Excel that will include the settings for five new mailboxes:

  2. Go to File | Save As and select CSV (Comma delimited) (*.csv) for the file type. Save the file as C:\mailboxes1.csv.

  3. Within the Exchange Management Shell, create a secure password object to be used as an initial password for each mailbox:

    $pass = ConvertTo-SecureString...