added the profile option + updated the docs for it
This commit is contained in:
parent
828482643a
commit
ada6d0a18c
2 changed files with 15 additions and 2 deletions
|
@ -202,7 +202,7 @@ if ((($direction.ToLower() -ne "In") -And ($direction.ToLower() -ne "Out")) -And
|
||||||
$fwsettings.Add("Direction", $direction)
|
$fwsettings.Add("Direction", $direction)
|
||||||
};
|
};
|
||||||
if ((($action.ToLower() -ne "allow") -And ($action.ToLower() -ne "block")) -And ($state -eq "present")){
|
if ((($action.ToLower() -ne "allow") -And ($action.ToLower() -ne "block")) -And ($state -eq "present")){
|
||||||
$misArg+="Direction";
|
$misArg+="Action";
|
||||||
$msg+=@("for the Action parameter only the values 'allow' and 'block' are allowed");
|
$msg+=@("for the Action parameter only the values 'allow' and 'block' are allowed");
|
||||||
} else {
|
} else {
|
||||||
$fwsettings.Add("Action", $action)
|
$fwsettings.Add("Action", $action)
|
||||||
|
@ -225,6 +225,14 @@ foreach ($arg in $args){
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$profile=Get-Attr $params "profile" "all";
|
||||||
|
if (($profile -ne 'current') -or ($profile -ne 'domain') -or ($profile -ne 'standard') -or ($profile -ne 'all') ) {
|
||||||
|
$misArg+="Profile";
|
||||||
|
$msg+=@("for the Profile parameter only the values 'current', 'domain', 'standard' or 'all' are allowed");
|
||||||
|
} else {
|
||||||
|
|
||||||
|
$fwsettings.Add("profile", $profile)
|
||||||
|
}
|
||||||
|
|
||||||
if ($($($misArg|measure).count) -gt 0){
|
if ($($($misArg|measure).count) -gt 0){
|
||||||
$result=New-Object psobject @{
|
$result=New-Object psobject @{
|
||||||
|
|
|
@ -88,6 +88,11 @@ options:
|
||||||
- the protocol this rule applies to
|
- the protocol this rule applies to
|
||||||
default: null
|
default: null
|
||||||
required: false
|
required: false
|
||||||
|
profile:
|
||||||
|
describtion:
|
||||||
|
- the profile this rule applies to
|
||||||
|
default: all
|
||||||
|
choices: ['current', 'domain', 'standard', 'all']
|
||||||
force:
|
force:
|
||||||
description:
|
description:
|
||||||
- Enforces the change if a rule with different values exists
|
- Enforces the change if a rule with different values exists
|
||||||
|
@ -107,4 +112,4 @@ EXAMPLES = '''
|
||||||
action: allow
|
action: allow
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
|
|
||||||
'''
|
'''
|
||||||
|
|
Loading…
Reference in a new issue