< Back
Remove-NsxSecurityGroup
Post
NAME Remove-NsxSecurityGroup
SYNOPSIS
Removes the specified NSX Security Group.
SYNTAX
Remove-NsxSecurityGroup [-SecurityGroup] <XmlElement> [-confirm] [-force] [-Connection <PSObject>]
[<CommonParameters>]
DESCRIPTION
An NSX Security Group is a grouping construct that provides a powerful
grouping function that can be used in DFW Firewall Rules and the NSX
Service Composer.
This cmdlet deletes a specified Security Groups object. If the object
is currently in use the api will return an error. Use -force to override
but be aware that the firewall rulebase will become invalid and will need
to be corrected before publish operations will succeed again.
PARAMETERS
-SecurityGroup <XmlElement>
SecurityGroup object as returned by get-nsxsecuritygroup
Required? true
Position? 2
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-confirm [<SwitchParameter>]
Disable confirmation prompt
Required? false
Position? named
Default value True
Accept pipeline input? false
Accept wildcard characters? false
-force [<SwitchParameter>]
Force deletion of in use or system objects
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Connection <PSObject>
PowerNSX Connection object
Required? false
Position? named
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-NsxSecurityGroup TestSG | Remove-NsxSecurityGroup
Remove the SecurityGroup TestSG
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>$sg | Remove-NsxSecurityGroup -confirm:$false
Remove the SecurityGroup $sg without confirmation.
RELATED LINKS
SYNOPSIS
Removes the specified NSX Security Group.
SYNTAX
Remove-NsxSecurityGroup [-SecurityGroup] <XmlElement> [-confirm] [-force] [-Connection <PSObject>]
[<CommonParameters>]
DESCRIPTION
An NSX Security Group is a grouping construct that provides a powerful
grouping function that can be used in DFW Firewall Rules and the NSX
Service Composer.
This cmdlet deletes a specified Security Groups object. If the object
is currently in use the api will return an error. Use -force to override
but be aware that the firewall rulebase will become invalid and will need
to be corrected before publish operations will succeed again.
PARAMETERS
-SecurityGroup <XmlElement>
SecurityGroup object as returned by get-nsxsecuritygroup
Required? true
Position? 2
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-confirm [<SwitchParameter>]
Disable confirmation prompt
Required? false
Position? named
Default value True
Accept pipeline input? false
Accept wildcard characters? false
-force [<SwitchParameter>]
Force deletion of in use or system objects
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
-Connection <PSObject>
PowerNSX Connection object
Required? false
Position? named
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-NsxSecurityGroup TestSG | Remove-NsxSecurityGroup
Remove the SecurityGroup TestSG
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>$sg | Remove-NsxSecurityGroup -confirm:$false
Remove the SecurityGroup $sg without confirmation.
RELATED LINKS