< Back
Protect-Script
Post
NAME Protect-Script
SYNOPSIS
Expands aliases and validates scripts, preventing embedded script and
SYNTAX
Protect-Script [-Script] <String> -AllowedModule <String[]> [-AllowedCommand <String[]>] [-AllowedVariable
<String[]>] [<CommonParameters>]
DESCRIPTION
PARAMETERS
-Script <String>
The script you want to expand aliases in
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-AllowedModule <String[]>
A list of modules that are allowed in the scripts we're protecting
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-AllowedCommand <String[]>
A list of commands that are allowed even if they're not in the AllowedModule(s)
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-AllowedVariable <String[]>
A list of variables that are allowed even if they're not in the AllowedModule(s)
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
RELATED LINKS
SYNOPSIS
Expands aliases and validates scripts, preventing embedded script and
SYNTAX
Protect-Script [-Script] <String> -AllowedModule <String[]> [-AllowedCommand <String[]>] [-AllowedVariable
<String[]>] [<CommonParameters>]
DESCRIPTION
PARAMETERS
-Script <String>
The script you want to expand aliases in
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-AllowedModule <String[]>
A list of modules that are allowed in the scripts we're protecting
Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-AllowedCommand <String[]>
A list of commands that are allowed even if they're not in the AllowedModule(s)
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-AllowedVariable <String[]>
A list of variables that are allowed even if they're not in the AllowedModule(s)
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
RELATED LINKS