Positional parameters are
designated with a number, starting with position 1, then position 2, and so on. Using positional
parameters effectively can be a real time - saving practice.
Part I: PowerShell for Exchange Fundamentals
14
For example, the Identity parameter is typically a positional parameter used in position 1 after the
cmdlet name. The Get-Mailbox cmdlet uses the Identity parameter in position 1 to identify the
mailbox - enabled user for which to retrieve information. In Figure 1 - 9 , you can see that the results of
running the Get-Mailbox cmdlet with and without the Identity parameter name are identical as long
as the input value is supplied in the first position after the cmdlet name.
Figure 1-9
If a parameter is not positional, then it is named. To use a named parameter you must always enter the
parameter name followed by the input value. The order in which you enter named parameters and their
input value on the command line does not matter because the shell ??™ s command parser interprets the
command in total before execution.
Parameter Shortcuts
Another time - saving feature you may find useful is parameter name shortcuts. When entering the name
of a parameter, you need to supply only enough of a parameter ??™ s name to disambiguate it from any
other parameter name.
Pages:
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46