< Back

Disconnect-AzureEswNetworkSecurityGroups

Mon Jan 13, 2020 7:11 pm

NAME Disconnect-AzureEswNetworkSecurityGroups



SYNOPSIS

Kill switch for NSGs in ARM VNets and NICs.





SYNTAX

Disconnect-AzureEswNetworkSecurityGroups -VNet <PSVirtualNetwork> [-Subnet <String>] [<CommonParameters>]



Disconnect-AzureEswNetworkSecurityGroups [-Nic <PSNetworkInterface>] [<CommonParameters>]





DESCRIPTION

Kill switch for NSGs in ARM VNets and NICs.

Dissociates NSGs from VNets, Subnets and Nics in a fast and efficient manner.





PARAMETERS

-VNet <PSVirtualNetwork>

The target VNet to dissociates NSGs from.



Required? true

Position? named

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Subnet <String>

The target Subnet in the VNet to dissociates NSGs from.

If $null it will attempt to dissociate all NSGs from all Subnets in the VNet.



Required? false

Position? named

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Nic <PSNetworkInterface>

The target NIC (Network Interface card) to dissociates NSGs from.



Required? false

Position? named

Default value

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-AzureRmVirtualNetwork -Name my-vnet -ResourceGroupName my-rg | Disconnect-AzureEswNetworkSecurityGroups



Dissociates all NSGs from all the subnets in the my-vnet ARM Virtual Network.









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



PS C:\\>Get-AzureRmVirtualNetwork -Name my-vnet -ResourceGroupName my-rg | Disconnect-AzureEswNetworkSecurityGroups

-Subnet my-subnet



Dissociates all NSGs from just for the my-subnet Subnet in the my-vnet ARM Virtual Network.









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



PS C:\\>Get-AzureRmNetworkInterface -Name my-nic -ResourceGroupName my-rg | Disconnect-AzureEswNetworkSecurityGroups



Dissociates all NSGs from the ARM NIC my-nic.











RELATED LINKS