Prev | Current Page 608 | Next

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

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


if ($noErrors)
{
$outstring = ???[SUCCESS]: Creation of mailbox enabled account
for user $($user.name) succeeded, with mailbox on database: $($user.database)???
out-file $logfile -inputobject $outstring -append
}
The final lines of code left in the foreach loop are identical to that used in the first script version. The
$total variable is incremented by 1, and the progress indicator is updated to show the user that was
processed and the percent of users processed overall.
Running the bulk - newmailbox.v2.ps1 Script
The requirements for running bulk-newmailbox.v2.ps1 are identical to those for running
bulk-newmailbox.v1.ps1 , except for the CSV input file, which must also include the values for the
Department and Office attributes.
Chapter 15: User, Group, and Public Folder Administration
449
To demonstrate the errors that might be logged when creating new users with bulk-newmailbox.v2
.ps1 , a CSV file with values that were sure to cause failures was used to produce the following log file:
*******************************************************************
Run time = 07/18/2007 13:01:27 using input file users2.csv
*******************************************************************
[SUCCESS]: Creation of mailbox enabled account for user User One succeeded, with
mailbox on database: MB001\First Storage Group\Mailbox Database
----------------------------------------------------------
[ERROR]: Creation of mailbox enabled account for user User Two succeeded, but
addition to Distribution Group Manufacturing failed with error:
Add-DistributionGroupMember : Active Directory operation failed on MB001.


Pages:
596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620
Adamski METIN DUSZY wirtualne nieruchomoƛci 2 1 Leona Lewis