Get-AzPeering

Gets an existing peering with the specified name under the given subscription and resource group.

Syntax

Get-AzPeering
   [-SubscriptionId <String[]>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzPeering
   -Name <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String[]>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzPeering
   -ResourceGroupName <String>
   [-SubscriptionId <String[]>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzPeering
   -InputObject <IPeeringIdentity>
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]

Description

Gets an existing peering with the specified name under the given subscription and resource group.

Examples

Example 1: List all peerings

Get-AzPeering

Name           SkuName             Kind     PeeringLocation ProvisioningState Location
----           -------             ----     --------------- ----------------- --------
DemoComp1      Premium_Direct_Free Direct   Dallas          Succeeded         South Central US
DemoPeering    Premium_Direct_Free Direct   Dallas          Succeeded         South Central US
TestEdgeZone   Premium_Direct_Free Direct   Atlanta         Succeeded         East US 2
MapsIxRs       Premium_Direct_Free Direct   Ashburn         Succeeded         East US
DemoMapsConfig Premium_Direct_Free Direct   Seattle         Succeeded         West US 2
testexchange   Basic_Exchange_Free Exchange Amsterdam       Succeeded         West Europe
TestPeer1      Basic_Direct_Free   Direct   Amsterdam       Succeeded         West Europe
test1          Basic_Direct_Free   Direct   Athens          Succeeded         France Central

List all peerings in subscription

Example 2: Get specific peering by name and resource group

Get-AzPeering -Name DemoPeering -ResourceGroupName DemoRG

Name        SkuName             Kind   PeeringLocation ProvisioningState Location
----        -------             ----   --------------- ----------------- --------
DemoPeering Premium_Direct_Free Direct Dallas          Succeeded         South Central US

Get a specific peering by resource group and name

Parameters

-DefaultProfile

The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

Type:IPeeringIdentity
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

The name of the peering.

Type:String
Aliases:PeeringName
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

The name of the resource group.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SubscriptionId

The Azure subscription ID.

Type:String[]
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

IPeeringIdentity

Outputs

IPeering