DaveWentzel.com            All Things Data

cmdlet parameters


: is used to specify boolean parameters:

get-process|out-host -paging

or

get-process|out-host -paging:$true

or more simply

get-process|more

 

to determine available parameters:

get-help <cmdlet>|more

or

(get-help <cmdlet>).syntax

the paired parens cause an object to be created first, which you then return the syntax property for.  Another example of this:

(get-help get-service).parameters

 

Common Parameters


































-Debug

 

-ErrorAction

Continue(default)
SilentlyContinue
Inquire

-ErrorVariable

variable populated in addition to $error

-OutVariable

use to store the output of a command or pipeline

-Verbose

 


 

-Confirm

the user is asked to confirm the action first. 

 

 

 

 

 

 

 

Add new comment