Prev | Current Page 600 | Next

Joezer Cookey-Gam, Brendan Keane, Jeffrey Rosen, and Jonathan Runyon

"Professional Windows PowerShell for Exchange Server 2007 Service Pack 1"

Administrative tasks that follow the creation of a new mailbox - enabled user account typically
include adding the account to one or more Distribution Groups. With a few lines of additional code this
functionality can be incorporated into the bulk-newmailbox.v1.ps1 script.
Active Directory user accounts include several named attributes such as City, Title, Department, Office,
and Manager, to name a few. User attributes offer a convenient method for determining Distribution
Group membership. For example, a user ??™ s Department attribute can be used to determine membership
in a Distribution Group for that department.
To demonstrate this concept, the script bulk-newmailbox.v2.ps1 extends the first version to add
automatic Distribution Group membership based on the Department and Office attributes. These
attribute values must be included in the CSV file used as input to the script.
The additional code that adds this functionality is limited to the foreach loop that creates the mailbox -
enabled accounts, therefore that is the only section of code from bulk-newmailbox.v2.ps1 that needs
to be examined.
Part IV: Automating Administration
444
# Create the mailbox enabled accounts
foreach ($user in $users)
{
New-Mailbox -Name:$user.name -Database:$user.Database `
-OrganizationalUnit:$user.


Pages:
588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612
teksty piosenek prace magisterskie wyniki na żywo reklama białystok DC++ Ultra Speed