Get-AzPeering

此 Cmdlet 是 預覽 模組的一部分。 不建議在生產環境中使用預覽版本。 如需詳細資訊,請參閱 https://aka.ms/azps-refstatus。

取得具有指定訂用帳戶和資源群組下指定名稱的現有對等互連。

語法

List1 (預設值)

Get-AzPeering
    [-SubscriptionId <String[]>]
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

Get

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

List

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

GetViaIdentity

Get-AzPeering
    -InputObject <IPeeringIdentity>
    [-DefaultProfile <PSObject>]
    [<CommonParameters>]

Description

取得具有指定訂用帳戶和資源群組下指定名稱的現有對等互連。

範例

範例 1:列出所有對等互連

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

列出訂用帳戶中的所有對等互連

範例 2:依名稱和資源群組取得特定對等互連

Get-AzPeering -Name DemoPeering -ResourceGroupName DemoRG
Name        SkuName             Kind   PeeringLocation ProvisioningState Location
----        -------             ----   --------------- ----------------- --------
DemoPeering Premium_Direct_Free Direct Dallas          Succeeded         South Central US

依資源組名取得特定的對等互連

參數

-DefaultProfile

DefaultProfile 參數無法運作。 如果針對不同的訂用帳戶執行 Cmdlet,請使用 SubscriptionId 參數。

參數屬性

類型:PSObject
預設值:None
支援萬用字元:False
不要顯示:False
別名:AzureRMContext, AzureCredential

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-InputObject

Identity 參數

參數屬性

類型:IPeeringIdentity
預設值:None
支援萬用字元:False
不要顯示:False

參數集

GetViaIdentity
Position:Named
必要:True
來自管線的值:True
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-Name

對等互連的名稱。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False
別名:PeeringName

參數集

Get
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-ResourceGroupName

資源群組的名稱。

參數屬性

類型:String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

Get
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False
List
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-SubscriptionId

Azure 訂閱識別碼。

參數屬性

類型:

String[]

預設值:(Get-AzContext).Subscription.Id
支援萬用字元:False
不要顯示:False

參數集

List1
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False
Get
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False
List
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

CommonParameters

此 Cmdlet 支援常見參數: -Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 如需詳細資訊,請參閱 about_CommonParameters。

輸入

IPeeringIdentity

輸出

IPeering