The Name parameter
??‘
??‘
??‘
??‘
Figure 1-13
Part I: PowerShell for Exchange Fundamentals
18
cannot be used in conjunction with either the Verb or Noun parameters. In Figure 1 - 14 , Get-Command
is used with the Verb and Noun parameters to return a list of matching cmdlets.
The CommandType parameter allows you to specify the type of command for which to return matches.
Possible values are Alias , Function , Cmdlet , ExternalScript , Application , and All . Using
Get-Command in this way allows you to find these additional command elements that are not exposed
when searching for cmdlets using Get-Help . For example, the command in Figure 1 - 15 uses the
CommandType parameter to find external scripts that contain the word database somewhere in
their name.
Figure 1-14
Figure 1-15
ExternalScript command elements are Windows PowerShell scripts located in the %ProgramFiles%\
Microsoft\Exchange Server\Scripts directory. In this example two scripts included with Exchange
Server 2007 match the search criteria for names that include database .
Chapter 1: Getting Started with Windows PowerShell
19
Get-Command can also be used to return detailed information about the syntax of a given cmdlet using
the Syntax parameter. However, you may find the syntax information exposed in a cmdlet ??™ s help
information to be more useful in the long run because it is accompanied by other help details.
Pages:
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51