< Back

Remove-NsxSecurityPolicyAssignment

Sat Jan 18, 2020 9:25 pm

NAME Remove-NsxSecurityPolicyAssignment



SYNOPSIS

Removes the applied Security Policy from specified Security Group(s).





SYNTAX

Remove-NsxSecurityPolicyAssignment [-SecurityPolicy] <XmlElement> [-SecurityGroup] <XmlElement[]> [[-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 Remove-NsxSecurityPolicyAssignment cmdlet removes the specified Security

Policy from the specified Security Group.





PARAMETERS

-SecurityPolicy <XmlElement>

Security Policy whose application will be removed from the specified Security Group



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-SecurityGroup <XmlElement[]>

Security Group to remove the specified Security Policy from its applied policies list.



Required? true

Position? 2

Default value

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:\\>$sg = Get-NsxSecurityGroup WebApp1WebServers



PS C:\\>Get-NsxSecurityPolicy WebServers | Remove-NsxSecurityPolicyAssignment -SecurityGroup $sg



Removes the Security Policy Webservers from the applied policies list of the WebApp1WebSevers Security Group.











RELATED LINKS