Datasheet
Part I: PowerShell for Exchange Fundamentals
10
The Get verb is the most common verb used in Exchange Management Shell cmdlets. It is also known
as the default verb. When a cmdlet noun name is entered without a verb, Windows PowerShell assumes
that the
Get verb was implied and runs that cmdlet. In the preceding example, entering
ExchangeServer instead of Get-ExchangeServer would yield the same results.
Noun Names
Nouns always represent the target of the cmdlet, in other words the thing on which the cmdlet will act.
Noun names are usually straightforward and simply describe the target item. For example, consider the
cmdlet
Get-ClusteredMailboxServerStatus . From looking at this cmdlet ’ s name you should be able
to figure out that its purpose is to retrieve the status of Clustered Mailbox Servers. When you apply this
logic to other cmdlet names you quickly begin to understand how easy it can be to discover and
learn cmdlets.
Another concept of noun names you should understand is that many cmdlet names share the same
noun. For example, there are 10 different cmdlets that all affect mailbox items. Here are examples of just
a few of these cmdlets:
Get-Mailbox is used to retrieve information about one or more mailbox - enabled users.
Set-Mailbox is used to change configuration settings for one or more mailbox - enabled users.
New-Mailbox is used to create a new mailbox - enabled user.
Move-Mailbox is used to move one or more mailboxes from one mailbox database to another.
As you can see, these examples all use a common noun name, yet each cmdlet yields very different
results when it is coupled with a different verb name.
Parameters
Parameter names are preceded by a dash or hyphen ( - ) and can be made up of a single word or multiple
words with no spaces between them. Parameter names are typically followed by one or more values that
are used either to provide input data for setting property values or to dictate the behavior of the cmdlet.
Parameters that dictate behavior act as switches and typically do not require an input value.
Parameters have certain characteristics that determine how they are used. You can find out these
characteristics via the built - in help information for each cmdlet that is readily available from the
command line. Later this section covers how to get help and how to interpret that information to
know how to use parameters effectively.
Parameter Input Values
Parameter input values are typically integer (numbers), string (words), or Boolean (true or false) data
types. Other more specialized data types are also possible as defined by the class the cmdlet represents.
For example, many cmdlets specific to Exchange Management Shell have data type input values specific
to Exchange configuration components. The parameter data type is set when the cmdlet is defined.
Windows PowerShell validates parameter input values as the cmdlet executes. If an invalid value is used
or the format of the input data does not meet the cmdlet ’ s specification, the cmdlet fails to execute. For
example, if a parameter takes as input an integer value, but a string value is entered instead, the cmdlet
fails with an error that states the wrong data type was used.
❑
❑
❑
❑
c01.indd 10c01.indd 10 12/17/07 3:19:25 PM12/17/07 3:19:25 PM