< Back

Move-NsxSecurityPolicyRule

Sat Jan 18, 2020 9:14 pm

NAME Move-NsxSecurityPolicyRule



SYNOPSIS

Moves the specified rule to a new location within its parent Security Policy.





SYNTAX

Move-NsxSecurityPolicyRule [-Rule] <XmlElement> [-Destination] <String> [-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.



Move-NsxSecurityPolicyRule moves the specified rule to a new location within

it's parent Security Policy. Allowed destinations are 'Top', 'Bottom' or

'ToPosition', where -position must specified the desired location.





PARAMETERS

-Rule <XmlElement>

Security Policy Rule to reconfigure



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Destination <String>

Move the specified rule. Destination parameter must be used to specify the desired location.



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:\\>Get-NsxSecurityPolicy SecPol01 | Get-NsxSecurityPolicyRule -RuleType Firewall -Name AdminSsh |

Move-NsxSecurityPolicyRule -Destination Top



Moves the specified the firewall rule called AdminSsh to the top of the security policy SecPol01's configured

firewall rules.









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Get-NsxSecurityPolicy SecPol01 | Get-NsxSecurityPolicyRule -RuleType Firewall -Name AdminSsh |

Move-NsxSecurityPolicyRule -Destination Bottom



Moves the specified the firewall rule called AdminSsh to the bottom of the security policy SecPol01's configured

firewall rules.









-------------------------- EXAMPLE 3 --------------------------



PS C:\\>Get-NsxSecurityPolicy SecPol01 | Get-NsxSecurityPolicyRule -RuleType Firewall -Name AdminSsh |

Move-NsxSecurityPolicyRule -Destination 3



Moves the specified the firewall rule called AdminSsh to be the third of security policy SecPol01's configured

firewall rules.









-------------------------- EXAMPLE 4 --------------------------



PS C:\\>$dodgyrule = Get-NsxSecurityPolicy SecPol01 | Get-NsxSecurityPolicyRule -RuleType Firewall -Name DodgyRule



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

Move-NsxSecurityPolicyRule -Destination $dodgyrule.executionOrder



Moves the specified the firewall rule called AdminSsh to be above the rule called DodgyRule within security policy

SecPol01's configured firewall rules.











RELATED LINKS