alx9r
alx9r

Reputation: 4251

How can I discover parameter attributes for dynamic parameters?

The command Set-ItemProperty has a dynamic parameter named Type that is important for the Windows registry. Invoking Get-Help Set-ItemProperty does not mention the Type parameter. I think this omission occurs because Type is a dynamic parameter.

I would like to discover the Type parameter's attributes. In particular, I would like to know whether the ValueFromPipelineByPropertyName argument is set. How can I do this?

Upvotes: 0

Views: 152

Answers (1)

Vincent K
Vincent K

Reputation: 1346

cd hklm:
(Get-Command Set-ItemProperty).ParameterSets.parameters

Name                            : Type
ParameterType                   : Microsoft.Win32.RegistryValueKind
IsMandatory                     : False
IsDynamic                       : True
Position                        : -2147483648
ValueFromPipeline               : False
ValueFromPipelineByPropertyName : True
ValueFromRemainingArguments     : False
HelpMessage                     : 
Aliases                         : {}
Attributes                      : {__AllParameterSets}

enter image description here

Upvotes: 3

Related Questions