< Back

Get-AzureRmVirtualNetworkPeering

Tue Jan 29, 2019 9:55 pm

NAME Get-AzureRmVirtualNetworkPeering



SYNOPSIS

Gets the virtual network peering.





SYNTAX

Get-AzureRmVirtualNetworkPeering [-DefaultProfile <IAzureContextContainer>] [-Name <String>] -ResourceGroupName <String> -VirtualNetworkName

<String> [<CommonParameters>]





DESCRIPTION

The Get-AzureRmVirtualNetworkPeering cmdlet gets the virtual network peering.





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



-Name <String>

Specifies the virtual network peering name.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ResourceGroupName <String>

Specifies the resource group name that the virtual network peering belongs to.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-VirtualNetworkName <String>

Specifies the virtual network name that this cmdlet gets.



Required? true

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.PSVirtualNetworkPeering







NOTES









Example 1: Get a peering between two virtual networks



# Get virtual network peering named myVnet1TomyVnet2 located in myVirtualNetwork in the resource group named myResourceGroup.



Get-AzureRmVirtualNetworkPeering -Name "myVnet1TomyVnet2" -VirtualNetwork "myVnet" -ResourceGroupName "myResourceGroup"











RELATED LINKS

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

Add-AzureRmVirtualNetworkPeering

Remove-AzureRmVirtualNetworkPeering

Set-AzureRmVirtualNetworkPeering