
User, Group, and Public
Folder Administration
All good administrators know scripts are used to automate everyday tasks and ensure consistent
results with a minimum of effort. The built - in scripting capabilities of Windows PowerShell, and
by extension Exchange Management Shell, offer a level of control previously unavailable when
using administrative tools supplied in earlier versions of Exchange Server.
This chapter examines these scripting capabilities via a thorough examination of sample
administrative scripts, starting at a basic level and expanding to scripts that accomplish more
complex tasks.
This chapter explores scripts that complete these tasks:
❑ Mailbox - enable users
❑ Assign group membership based on user attributes
❑ Load - balance mailbox creation across databases based on user names
❑ Create a public folder for a user
Sample Scripts for Creating New
Mailbox - Enabled Users
One of the best examples of an administrative task easily automated via scripting is the creation of
new mailbox - enabled user accounts.
This section covers four sample scripts for automating the creation of new mailbox - enabled accounts.
The first script is very simple and covers the basics you need to know when creating a script that
uses Exchange Management Shell commands. A second script expands on the first to add error
c15.indd 425c15.indd 425 12/17/07 ...