< Back

Get-AzureRmNetworkSecurityGroup

Tue Jan 29, 2019 9:54 pm

NAME Get-AzureRmNetworkSecurityGroup



SYNOPSIS

Gets a network security group.





SYNTAX

Get-AzureRmNetworkSecurityGroup [-DefaultProfile <IAzureContextContainer>] -ExpandResource <String> -Name <String> -ResourceGroupName <String>

[<CommonParameters>]



Get-AzureRmNetworkSecurityGroup [-DefaultProfile <IAzureContextContainer>] [-Name <String>] [-ResourceGroupName <String>] [<CommonParameters>]





DESCRIPTION

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





PARAMETERS

-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ExpandResource <String>





Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Name <String>

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



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ResourceGroupName <String>

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



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

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 (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None

This cmdlet does not accept any input.





OUTPUTS

Microsoft.Azure.Commands.Network.Models.PSNetworkSecurityGroup







NOTES









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"







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... uritygroup

New-AzureRmNetworkSecurityGroup

Remove-AzureRmNetworkSecurityGroup

Set-AzureRmNetworkSecurityGroup