PSConsoleReadLineOptions.CommandsToValidateScriptBlockArguments Property

Definition

Most commands do not accept script blocks, but for those that do, we want to validate commands in the script block arguments. Unfortunately, we can't know how the argument is used. In the worst case, for commands like Get-ADUser, the script block actually specifies a different language.

Because we can't know ahead of time all of the commands that do odd things with script blocks, we create a white-list of commands that do invoke the script block - this covers the most useful cases.

public:
 property System::Collections::Generic::HashSet<System::String ^> ^ CommandsToValidateScriptBlockArguments { System::Collections::Generic::HashSet<System::String ^> ^ get(); void set(System::Collections::Generic::HashSet<System::String ^> ^ value); };
public System.Collections.Generic.HashSet<string> CommandsToValidateScriptBlockArguments { get; set; }
member this.CommandsToValidateScriptBlockArguments : System.Collections.Generic.HashSet<string> with get, set
Public Property CommandsToValidateScriptBlockArguments As HashSet(Of String)

Property Value

Applies to