IDynamicParameters.GetDynamicParameters IDynamicParameters.GetDynamicParameters IDynamicParameters.GetDynamicParameters Method


Returns an instance of an object that defines the dynamic parameters for this Cmdlet or CmdletProvider.

public object GetDynamicParameters ();
abstract member GetDynamicParameters : unit -> obj
Public Function GetDynamicParameters () As Object

This method should return an object that has properties and fields decorated with parameter attributes similar to a Cmdlet or CmdletProvider. These attributes include ParameterAttribute, AliasAttribute, argument transformation and validation attributes, etc.

         Alternately, it can return a
         <xref href="System.Management.Automation.RuntimeDefinedParameterDictionary"></xref>

         The <xref href="System.Management.Automation.Cmdlet"></xref> or <xref href="System.Management.Automation.Provider.CmdletProvider"></xref>
         should hold on to a reference to the object which it returns from
         this method, since the argument values for the dynamic parameters
         specified by that object will be set in that object.

         This method will be called after all formal (command-line)
         parameters are set, but before <xref href="System.Management.Automation.Cmdlet.BeginProcessing"></xref>
         is called and before any incoming pipeline objects are read.
         Therefore, parameters which allow input from the pipeline
         may not be set at the time this method is called,
         even if the parameters are mandatory.

Applies to