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.
??‘
??‘
??‘
??‘
Chapter 1: Getting Started with Windows PowerShell
11
In Figure 1 - 4 , the Set-Mailbox cmdlet is being used to set the ProhibitSendQuota attribute on
mailbox - enabled user John Doe. The expected data input type for parameter ProhibitSendQuota
is an integer value or integer value with a standard byte size abbreviation as a suffix. Because an
alphanumeric string value ( somestring ) was entered instead, the command fails to execute and the
error message shown describes the exact cause for the error.
Pages:
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42