Get-​Azure​Rm​Network​Security​Group

Gets a network security group.

Syntax

Get-AzureRmNetworkSecurityGroup
   -ExpandResource <String>
   -Name <String>
   -ResourceGroupName <String>
   [<CommonParameters>]
Get-AzureRmNetworkSecurityGroup
   [-Name <String>]
   [-ResourceGroupName <String>]
   [<CommonParameters>]

Description

The Get-AzureRmNetworkSecurityGroup cmdlet gets an Azure network security group.

Examples

1: Retrieve an existing network security group

Get-AzureRmNetworkSecurityGroup -Name  nsg1 -ResourceGroupName "rg1"

This command returns contents of Azure network security group "nsg1" in resource group "rg1"

Required Parameters

-ExpandResource
Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Name

Specifies the name of the network security group that this cmdlet gets.

Type:String
Aliases:ResourceName
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceGroupName

Specifies the name of the resource group that the network security group belongs to.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False