ScriptBlock.CheckRestrictedLanguage Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Check the script block to see if it uses any language constructs not allowed in restricted language mode.
public:
void CheckRestrictedLanguage(System::Collections::Generic::IEnumerable<System::String ^> ^ allowedCommands, System::Collections::Generic::IEnumerable<System::String ^> ^ allowedVariables, bool allowEnvironmentVariables);
public void CheckRestrictedLanguage (System.Collections.Generic.IEnumerable<string> allowedCommands, System.Collections.Generic.IEnumerable<string> allowedVariables, bool allowEnvironmentVariables);
member this.CheckRestrictedLanguage : seq<string> * seq<string> * bool -> unit
Public Sub CheckRestrictedLanguage (allowedCommands As IEnumerable(Of String), allowedVariables As IEnumerable(Of String), allowEnvironmentVariables As Boolean)
Parameters
- allowedCommands
- IEnumerable<String>
The commands that are allowed.
- allowedVariables
- IEnumerable<String>
The variables allowed in this scriptblock. If this is null, then the default variable set will be allowed. If it is an empty list, no variables will be allowed. If it is "*" then any variable will be allowed.
- allowEnvironmentVariables
- Boolean
The environment variables that are allowed.