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

Gets a network security group.

Syntax

Get-AzureRmNetworkSecurityGroup
   -ExpandResource <String>
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   -Name <String>
   -ResourceGroupName <String>
   [<CommonParameters>]
Get-AzureRmNetworkSecurityGroup
   [-InformationAction <ActionPreference>]
   [-InformationVariable <String>]
   [-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

-InformationAction

Specifies how this cmdlet responds to an information event.The acceptable values for this parameter are:- Continue

  • Ignore
  • Inquire
  • SilentlyContinue
  • Stop
  • Suspend
Type:ActionPreference
Aliases:infa
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InformationVariable

Specifies an information variable.

Type:String
Aliases:iv
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-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