Prev | Current Page 595 | Next

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

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


Chapter 15: User, Group, and Public Folder Administration
441
The activity label is specified by the Activity parameter and is set to display ???Processed User:
< current user > ??? . The current user value changes dynamically as users are processed. The status label is
specified by the -Status parameter and is set to ???Progress:??? . This value is static and does not change.
The progress indicator is simply a series of characters (lowercase o) that increase in number left to right
to indicate the percentage of users that have been processed, as shown in this example that includes all
three elements as they appear at the top of the console screen:
Processed User: John Doe
Progress:
[oooooooooooooooooooooooooooooooooooooooooooooooooooooo ]
The PercentageComplete parameter is used to specify an equation that calculates the percentage of
users that have been processed through the current iteration of the foreach loop. In this equation the
current total of users processed ( $total ) is divided by the total number of users to be processed overall
( $users.count ). That result is then multiplied by 100 to produce a percentage.
For example, if 4 users out of 10 have been processed, the percentage processed at that point would be
40% of the total (4/10 * 100). The resulting progress indicator display would then show approximately 28
??? o ??? characters out of 70 total to represent 40%.


Pages:
583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607
plecaki projektowanie ogrodów łódź Okna PCV Wrocław Kurs architektury wyprawy