Remove-AzureNetworkSecurityRule

Removes a network security rule from a network security group.

Note

The cmdlets referenced in this documentation are for managing legacy Azure resources that use Azure Service Manager (ASM) APIs. This legacy PowerShell module isn't recommended when creating new resources since ASM is scheduled for retirement. For more information, see Azure Service Manager retirement.

The Az PowerShell module is the recommended PowerShell module for managing Azure Resource Manager (ARM) resources with PowerShell.

Syntax

Remove-AzureNetworkSecurityRule
      -Name <String>
      [-Force]
      -NetworkSecurityGroup <INetworkSecurityGroup>
      [-Profile <AzureSMProfile>]
      [<CommonParameters>]

Description

The Remove-AzureNetworkSecurityRule cmdlet removes an Azure network security rule from a network security group.

Parameters

-Force

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specifies the name for the network security rule that this cmdlet removes.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-NetworkSecurityGroup

Specifies the network security group that this cmdlet modifies. To obtain an INetworkSecurityGroup object, use the Get-AzureNetworkSecurityGroup cmdlet.

Type:INetworkSecurityGroup
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Profile

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.

Type:AzureSMProfile
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False