Using Format-Table (or its alias ft ) you can override the
default format by specifying the property names you want displayed separated by commas as shown in
this example:
[PS] C:\ > get-mailbox johdoe | Format-Table name, alias, database, primarysmtpadd
ress
Name Alias Database PrimarySmtpAddress
---- ----- -------- ------------------
John Doe johdoe MB001\First Stor... johdoe@exchangee...
So now you see the information that you are looking for, but because the default behavior of table
formatting is to truncate anything that cannot be displayed in the current column width and on one line,
you don ??™ t get to see all the information. Notice there is some wasted space between columns. By adding
the AutoSize parameter you can force Format-List to more efficiently use the entire width of the
console screen as shown in this example:
[PS] C:\ > get-mailbox johdoe | Format-Table name, alias, database, primarysmtpadd
ress -AutoSize
Name Alias Database PrimarySmtpAddress
---- ----- -------- ------------------
John Doe johdoe MB001\First Storage Group\Mailbox Database johdoe@exchangeex...
Chapter 2: Using Exchange Management Shell
47
Now you can see more information, but notice that the PrimarySMTPAddress column is still truncated.
By adding the Wrap parameter you can force Format-List to wrap values longer than one line to as
many additional lines required to display the entire value as shown in this example:
[PS] C:\ > get-mailbox johdoe | Format-Table name, alias, database, primarysmtpadd
ress -AutoSize -wrap
Name Alias Database PrimarySmtpAddress
---- ----- -------- ------------------
John Doe johdoe MB001\First Storage Group\Mailbox Database johdoe@exchangeexcha
nge.
Pages:
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92