Prev | Current Page 79 | Next

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

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


Figure 2 - 2 shows an example of both raw and formatted output. The Get-TransportConfig cmdlet
produces an output of all properties in list format and Get-TransportServer produces just three
property values in table format.
??‘
??‘
Figure 2-2
Part I: PowerShell for Exchange Fundamentals
46
In most cases when using Exchange Management Shell you will see table - formatted output. The
predefined formatting being used is specified in a file called exchange.format.ps1xml located in the
Exchange\bin directory.
When it is necessary to see information that is not included in default output, Windows PowerShell
provides several cmdlets that allow you to override the formatting to force the display of information
after it is passed to Out-Host . The two cmdlets you will find most useful for this purpose are
Format-Table and Format-List .
Consider the cmdlet Get-Mailbox . The standard output for this cmdlet is table format, with property
values Name , Alias , ServerName , and ProhibitSendQuota as shown in the following example:
[PS] C:\ > get-mailbox johdoe
Name Alias ServerName ProhibitSendQuo
ta
---- ----- ---------- ---------------
John Doe johdoe mb001 unlimited
Suppose that you need to see different properties, such as Database and PrimarySMTPAddress instead
of ServerName and ProhibitSendQuota .


Pages:
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
serwery vps studium wykonalności wakacje sztuczne ognie Modelki Śląsk