你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Update-AzVirtualRouterPeer

Update a Peer in an Azure VirtualRouter

Syntax

Update-AzVirtualRouterPeer
      -ResourceGroupName <String>
      -VirtualRouterName <String>
      [-Force]
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzVirtualRouterPeer
      -ResourceGroupName <String>
      -PeerName <String>
      -PeerIp <String>
      -PeerAsn <UInt32>
      -VirtualRouterName <String>
      [-Force]
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzVirtualRouterPeer
      -ResourceGroupName <String>
      -VirtualRouterName <String>
      -InputObject <PSVirtualRouterPeer>
      [-Force]
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Update-AzVirtualRouterPeer
      -ResourceGroupName <String>
      -VirtualRouterName <String>
      -ResourceId <String>
      [-Force]
      [-AsJob]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Update-AzVirtualRouterPeer cmdlet updates a VirtualRouter Peer to an Azure VirtualRouter

Examples

Example 1

Update-AzVirtualRouterPeer -PeerName csr -PeerIp 10.0.1.5 -PeerAsn 63000  -VirtualRouterName virtualRouter -ResourceGroupName virtualRouterRG

Example 2

$virtualRouterPeerId = '/subscriptions/8c992d64-fce9-426d-b278-85642dfeab03/resourceGroups/virtualRouterRG/providers/Microsoft.Network/virtualRouters/testVirtualRouter/peerings/csr'
Update-AzVirtualRouterPeer -ResourceId $virtualRouterPeerId  -VirtualRouterName virtualRouter -ResourceGroupName virtualRouterRG

Example 3

$virtualRouterPeer = Get-AzVirtualRouterPeer -ResourceGroupName testVirtualRouter -VirtualRouterName virtualRouter -PeerName csr
Update-AzVirtualRouterPeer -ResourceGroupName virtualRouterRG -InputObject $virtualRouterPeer  -VirtualRouterName virtualRouter

Parameters

-AsJob

Run cmdlet in the background

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

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

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Force

Do not ask for confirmation if you want to overwrite a resource

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

-InputObject

The virtual router peer input object.

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

-PeerAsn

Peer ASN.

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

-PeerIp

Peer Ip.

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

-PeerName

The name of the virtual router Peer.

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

-ResourceGroupName

The resource group name of the virtual router/peer.

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

-ResourceId

The virtual router peer resource Id.

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

-VirtualRouterName

The virtual router where peer exists.

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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

UInt32

PSVirtualRouterPeer

Outputs

PSVirtualRouter