Azure / Azure/azure-powershell
Unable to establish Global Reach with Set-AzExpressRouteCircuit -ExpressRouteCircuit $ckt1
- Dominant language
- C#
- Stars
- 4.8k
- Forks
- 4.3k
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 54
Description
## Description
Unable to establish global reach using powershell az module anymore. azure-cli method works fine. No error returned, simply the unmodified circuit information is returned.
## Steps to reproduce
```powershell
Get-AzSubscription -SubscriptionId $peersubid | Set-AzContext
$ckt2 = Get-AzExpressRouteCircuit -name $PeerExpressRoute -ResourceGroupName $PeerERResourceGroup
If($ckt2){$AuthKey = ($ckt2.Authorizations | Where-Object {$_.Name -eq $AuthKeyName}).AuthorizationKey}
Get-AzSubscription -SubscriptionId $subid | Set-AzContext
$ckt1 = Get-AzExpressRouteCircuit -name $ERCircuitName -ResourceGroupName $ERResourceGroup
$ckt2privpeer = ($ckt2.peerings | Where-Object {$_.Name -eq "AzurePrivatePeering"})
Add-AzExpressRouteCircuitConnectionConfig `
-Name $GRName `
-ExpressRouteCircuit $ckt1 `
-PeerExpressRouteCircuitPeering $ckt2privpeer.id `
-AddressPrefix $GRAddressPrefix `
-AuthorizationKey $AuthKey
Set-AzExpressRouteCircuit -ExpressRouteCircuit $ckt1
```
## Environment data
```
Name Value
---- -----
PSVersion 6.2.4
PSEdition Core
GitCommitId 6.2.4
OS Darwin 19.3.0 Darwin Kernel Version 19.3.0: Thu Jan 9 20:58:23 PST 2020; root:xnu-6153.81.5~1/RELEASE_X86_64
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
```
## Module versions
```powershell
Directory: /Users/cnakagaki/.local/share/powershell/Modules
ModuleType Version Name PSEdition ExportedCom
mands
---------- ------- ---- --------- -----------
Script 3.3.0 Az Core,Desk
Script 1.7.0 Az.Accounts Core,Desk {Disable-A…
Script 1.1.1 Az.Advisor Core,Desk {Get-AzAdv…
Script 1.0.3 Az.Aks Core,Desk {Get-AzAks…
Script 1.1.2 Az.AnalysisServices Core,Desk {Resume-Az…
Script 1.3.3 Az.ApiManagement Core,Desk {Add-AzApi…
Script 1.0.3 Az.ApplicationInsights Core,Desk {Get-AzApp…
Script 1.3.5 Az.Automation Core,Desk {Get-AzAut…
Script 2.0.2 Az.Batch Core,Desk {Remove-Az…
Script 1.0.2 Az.Billing Core,Desk {Get-AzBil…
Script 1.4.2 Az.Cdn Core,Desk {Get-AzCdn…
Script 1.2.2 Az.CognitiveServices Core,Desk {Get-AzCog…
Script 3.3.0 Az.Compute Core,Desk {Remove-Az…
Script 1.0.3 Az.ContainerInstance Core,Desk {New-AzCon…
Script 1.1.1 Az.ContainerRegistry Core,Desk {New-AzCon…
Script 1.1.0 Az.DataBoxEdge Core,Desk {Get-AzDat…
Script 1.6.0 Az.DataFactory Core,Desk {Set-AzDat…
Script 1.0.2 Az.DataLakeAnalytics Core,Desk {Get-AzDat…
Script 1.2.6 Az.DataLakeStore Core,Desk {Get-AzDat…
Script 1.0.2 Az.DeploymentManager Core,Desk {Get-AzDep…
Script 1.0.2 Az.DevTestLabs Core,Desk {Get-AzDtl…
Script 1.1.2 Az.Dns Core,Desk {Get-AzDns…
Script 1.2.3 Az.EventGrid Core,Desk {New-AzEve…
Script 1.4.3 Az.EventHub Core,Desk {New-AzEve…
Script 1.3.0 Az.FrontDoor Core,Desk {New-AzFro…
Script 3.0.2 Az.HDInsight Core,Desk {Get-AzHDI…
Script 1.0.1 Az.HealthcareApis Core,Desk {New-AzHea…
Script 2.0.1 Az.IotHub Core,Desk {Add-AzIot…
Script 1.4.0 Az.KeyVault Core,Desk {Add-AzKey…
Script 1.3.2 Az.LogicApp Core,Desk {Get-AzInt…
Script 1.1.3 Az.MachineLearning Core,Desk {Move-AzMl…
Script 1.0.2 Az.ManagedServices Core,Desk {Get-AzMan…
Script 1.0.2 Az.MarketplaceOrdering Core,Desk {Get-AzMar…
Script 1.1.1 Az.Media Core,Desk {Sync-AzMe…
Script 1.5.0 Az.Monitor Core,Desk {Get-AzMet…
Script 2.2.1 Az.Network Core,Desk {Add-AzApp…
Script 1.1.1 Az.NotificationHubs Core,Desk {Get-AzNot…
Script 1.3.4 Az.OperationalInsights Core,Desk {New-AzOpe…
Script 1.1.4 Az.PolicyInsights Core,Desk {Get-AzPol…
Script 1.1.1 Az.PowerBIEmbedded Core,Desk {Remove-Az…
Script 1.0.2 Az.PrivateDns Core,Desk {Get-AzPri…
Script 2.4.0 Az.RecoveryServices Core,Desk {Get-AzRec…
Script 1.2.1 Az.RedisCache Core,Desk {Remove-Az…
Script 1.0.3 Az.Relay Core,Desk {New-AzRel…
Script 1.9.1 Az.Resources Core,Desk {Get-AzPro…
Script 1.4.1 Az.ServiceBus Core,Desk {New-AzSer…
Script 2.0.1 Az.ServiceFabric Core,Desk {Add-AzSer…
Script 1.1.1 Az.SignalR Core,Desk {New-AzSig…
Script 2.1.2 Az.Sql Core,Desk {Get-AzSql…
Script 1.0.2 Az.SqlVirtualMachine Core,Desk {New-AzSql…
Script 1.11.0 Az.Storage Core,Desk {Get-AzSto…
Script 1.2.2 Az.StorageSync Core,Desk {Invoke-Az…
Script 1.0.1 Az.StreamAnalytics Core,Desk {Get-AzStr…
Script 1.0.3 Az.TrafficManager Core,Desk {Add-AzTra…
Script 1.5.1 Az.Websites Core,Desk {Get-AzApp…
Script 6.7.0.112… VMware.DeployAutomation Desk {Add-Deplo…
Script 6.7.0.112… VMware.ImageBuilder Desk {Add-EsxSo…
Manifest 11.5.0.14… VMware.PowerCLI Desk
Script 6.7.0.148… VMware.Vim Desk
Script 11.5.0.14… VMware.VimAutomation.Cis.Core Desk {Connect-C…
Script 11.0.0.10… VMware.VimAutomation.Cloud Desk {Add-CIDat…
Script 11.5.0.14… VMware.VimAutomation.Common Desk {Get-Task,…
Script 11.5.0.14… VMware.VimAutomation.Core Desk {Add-Passt…
Script 11.5.0.14… VMware.VimAutomation.Hcx Desk {Connect-H…
Script 7.10.0.14… VMware.VimAutomation.HorizonView Desk {Connect-H…
Script 11.3.0.13… VMware.VimAutomation.License Desk Get-Licens…
Script 11.5.0.14… VMware.VimAutomation.Nsxt Desk {Connect-N…
Script 11.5.0.14… VMware.VimAutomation.Sdk Desk {Get-Error…
Script 11.0.0.10… VMware.VimAutomation.Security Desk {Get-Secur…
Script 11.5.0.14… VMware.VimAutomation.Srm Desk {Connect-S…
Script 11.5.0.14… VMware.VimAutomation.Storage Desk {Add-KeyMa…
Script 1.3.0.0 VMware.VimAutomation.StorageUtility Desk Update-Vmf…
Script 11.2.0.12… VMware.VimAutomation.Vds Desk {Add-VDSwi…
Script 11.5.0.14… VMware.VimAutomation.Vmc Desk {Add-VmcSd…
Script 10.0.0.78… VMware.VimAutomation.vROps Desk {Connect-O…
Script 6.5.1.786… VMware.VumAutomation Desk {Add-Entit…
Directory: /usr/local/microsoft/powershell/6/Modules
ModuleType Version Name PSEdition ExportedCom
mands
---------- ------- ---- --------- -----------
Manifest 1.2.3.0 Microsoft.PowerShell.Archive Desk {Compress-…
Manifest 6.1.0.0 Microsoft.PowerShell.Host Core {Start-Tra…
Manifest 6.1.0.0 Microsoft.PowerShell.Management Core {Add-Conte…
Manifest 6.1.0.0 Microsoft.PowerShell.Security Core {Get-Crede…
Manifest 6.1.0.0 Microsoft.PowerShell.Utility Core {Export-Al…
Script 1.3.2 PackageManagement Desk {Find-Pack…
Script 2.1.3 PowerShellGet Desk {Find-Comm…
Script 0.0 PSDesiredStateConfiguration Desk {ValidateN…
Script 2.0.0 PSReadLine Desk {Get-PSRea…
Binary 1.1.2 ThreadJob Desk Start-Thre…
```
## Debug output
```
```
## Error output
```
```
Contributor guide
Research direction
Start by rerunning the listed Get-AzSubscription, Get-AzExpressRouteCircuit, Add-AzExpressRouteCircuitConnectionConfig, and Set-AzExpressRouteCircuit sequence, then compare it with the working Azure CLI method. Trace why Set-AzExpressRouteCircuit returns the unmodified circuit without an error; done means the PowerShell sequence establishes Global Reach and persists the connection configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, powershell
- Domain
- cloud, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100