3. Getting Tips
You may have noticed a useful tip each time you launched the Exchange Management Console. Figure 3 shows the Tip of the Day text that you see each time you launch the EMS. There are more than 70 of these tips.
If you want to view additional tips, just type Get-Tip at the Exchange Management Shell prompt. You can also visit the following URL if you want to see more:
http://technet.microsoft.com/en-us/library/bb397216(EXCHG.80).aspx
You can even add your own tips if you don't mind editing an XML file; the tips for English are found in C:\program files\Microsoft\Exchange Server\v14\bin\extips.xml.
4. Learning from the Graphical User Interface
If you are like most Windows administrators, during
your tenure as a Windows administrator you have come to rely almost
entirely on the graphical user interface for most of the administration
that you need to do. The advent of the PowerShell did not really worry
too many of us in the "GUI boat" until we found that Exchange Server
2007/2010 relies so heavily on the underlying Exchange Management Shell.
As we mentioned earlier, there are even some
Exchange functions and management settings that you can only perform
from the EMS. However, even a hard-core GUI administrator can quickly
learn some powerful new tricks by learning the EMS. Microsoft has tried
to provide you with a few powerful tools for learning more about how
the EMS functions. The first of these tools is the Completion page of
most wizards that you find in the Exchange Management Console. An
example appears in Figure 4.
The Completion page shows you the command or
commands that were executed to complete the task you created in the
Exchange Management Console wizard. In the example in Figure 4,
we created a new mailbox for user Jason.Crawford and assigned it to
database DB01. By simply pressing Ctrl+C on the Completion wizard page,
we can copy the entire text of the page to the paste buffer. From
there, we can easily grab the command that was executed; in this case
it is as follows:
New-Mailbox -Name 'Jason R. Crawford' -Alias 'Jason.Crawford'
-OrganizationalUnit 'volcanosurfboards.com/Scully Surfboards'
-UserPrincipalName '[email protected]'
-SamAccountName 'Jason.Crawford' -FirstName 'Jason' -Initials 'R'
-LastName 'Crawford' -Password 'System.Security.SecureString'
-ResetPasswordOnNextLogon $false -Database 'DB01'
-ActiveSyncMailboxPolicy 'Strict ActiveSync policy' -Archive
This type of output is available for the wizards,
but what about making simple changes to something like a user account?
The Exchange 2010 Management Console includes an option that you might
not even notice unless you were looking for it. In Figure 5,
we're editing the user account for John.Rodriguez. Look in the
lower-left corner of this screen for a small icon; the icon is not even
available until you have actually made a change.
In Figure 5,
we changed the city, state, and zip code; as soon as we make the first
change on this screen, the icon in the lower left can now be clicked.
When we click this icon, we see a dialog box showing the EMS command
necessary to make these changes. An example is shown in Figure 6.
We can then copy the text in this dialog box and use
that as an example for making similar changes in the future. In this
particular example, the cmdlet necessary to make these changes looks
like this:
Set-User -City 'Honolulu' -StateOrProvince 'Hawaii' -PostalCode
'96816' -Identity 'volcanosurfboards.com/Scully
Surfboards/John Rodriguez'
This feature is pretty clever; we tried to trick it
by changing two properties that require separate cmdlets, but it
detected those correctly. Here is an example of changing the phone
number (Set-User) and a custom attribute (Set-Mailbox):
Set-Mailbox -CustomAttribute1 'Marketing' -Identity
'volcanosurfboards.com/Scully Surfboards/John Rodriguez'
Set-User -Phone ' (808) 555-1234' -Identity
'volcanosurfboards.com/Scully Surfboards/John Rodriguez'