Prev | Current Page 653 | Next

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

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

StorageLimitStatus }
Figure 16 - 6 shows the resulting list of all mailboxes that fit this criterion; however, this is still not as
effective as it needs to be.
Figure 16-6
If this list were much longer it might be difficult to determine which user falls into each group. As shown
in Figure 16 - 7 , you can pipe this list to Sort-Object and arrange this list by the StorageLimitStatus
and the TotalItemSize properties:
Sort-Object StorageLimitStatus, TotalItemSize
Chapter 16: Reporting, Maintenance, and Administration
477
The standard columns that are shown are not very helpful. Use the following code to show
DisplayName and TotalItemSize by piping the results. Figure 16 - 8 shows the outcome.
Format-Table DisplayName, StorageLimitStatus TotalItemSize
Figure 16-7
Figure 16 - 8
Part IV: Automating Administration
478
Figure 16-9
That is making some progress, however the TotalItemSize column is very unfriendly. Could you
imagine handing this report to your supervisor? Does your supervisor want to see the size of the user
mailboxes in bytes? As you recall from earlier in this book, PowerShell is based on the .NET Framework,
which means that certain functions of the Framework are available within PowerShell. You can actually
convert the value of TotalItemSize to kilobytes, megabytes, gigabytes, or terabytes from within the
command by modifying the last Format-Table command to modify this value:
Format-Table DisplayName, @{expression = {$_.


Pages:
641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665
Pozycjonowanie giełda samochodowa agencja detektywistyczna reklama seo