< Back

Add-NsxSecurityPolicyRuleService

Sat Jan 18, 2020 8:59 pm

NAME Add-NsxSecurityPolicyRuleService



SYNOPSIS

Modifies the configuration of an existing Security Policy Firewall or

Network Introspection Rule to add a service.





SYNTAX

Add-NsxSecurityPolicyRuleService [-Rule] <XmlElement> [-Service] <XmlElement[]> [-NoConfirm] [[-Connection]

<PSObject>] [<CommonParameters>]





DESCRIPTION

A security policy is a policy construct that can define one or more rules in

several different categories, that can then be applied to an arbitrary

number of Security Groups in order to enforce the defined policy.



The three categories of rules that can be included in a Security Policy are:



- Guest Introspection - data security, anti-virus, and vulnerability

management and rules based on third party Guest Introspection capability.

- Firewall rules - creates appropriate distributed firewall rules when

the policy is applied to a security group.

- Network introspection services - Thirdparty firewall, IPS/IDS etc.



Add-NsxSecurityPolicyRuleService modifies the configuration of an existing

Security Policy Firewall or Network Introspection Rule to add a service.





PARAMETERS

-Rule <XmlElement>

Security Policy Rule to reconfigure



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Service <XmlElement[]>

Group(s) to be added to source or destination of specified rule. Depends on currently configured direction of

the rule.



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-NoConfirm [<SwitchParameter>]

Disable confirmation prompt



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Connection <PSObject>

PowerNSX Connection object



Required? false

Position? 3

Default value $defaultNSXConnection

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



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>$svc = New-NsxService -Name AltSsh -Protocol TCP -port 2222



Get-NsxSecurityPolicy SecPol01 | Get-NsxSecurityPolicyRule -RuleType Firewall -Name AdminSsh |

Add-NsxSecurityPolicyRuleservice -Service $svc



Creates a new service called AltSsh and adds it to the Firewall rule AdminSsh within the Security Policy SecPol01











RELATED LINKS