Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot disassociate RouteTable with Set-AzVirtualNetworkSubnetConfig -RouteTable $null #9718

Closed
LucianFrango opened this issue Jul 24, 2019 · 4 comments

Comments

@LucianFrango
Copy link

commented Jul 24, 2019

Description

Associating a RouteTable with a subnet works fine. PowerShell example=
$RT = Get-AzRouteTable -name -ResourceGroupName
Set-AzVirtualNetworkSubnetConfig -VirtualNetwork -Name -AddressPrefix 10.0.0.0/8 -RouteTable $RT | Set-AzVirtualNetwork

However, dissociating a RouteTable from a subnet does not seem to work. PowerShell example:
$VNET = Get-AzVirtualNetwork -Name -ResourceGroupName
Set-AzVirtualNetworkSubnetConfig -VirtualNetwork $VNET -Name -AddressPrefix 10.10.10.0/24 -RouteTable $null | Set-AzVirtualNetwork

What happens is that the -RouteTable $null does not seem to do anything. I've tried just "null" as well, with no luck. When executing with $null the of the JSON output VNET and SUBNET config is visible in the PowerShell session, but no attributes are changed.

Steps to reproduce

Import-Module Az
Connect-AzAccount

$VNET = Get-AzVirtualNetwork -Name -ResourceGroupName
Set-AzVirtualNetworkSubnetConfig -VirtualNetwork $VNET -Name -AddressPrefix 10.10.10.0/24 -RouteTable $null | Set-AzVirtualNetwork

Environment data

Name Value


PSVersion 5.1.18362.145
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.18362.145
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Module versions

ModuleType Version Name ExportedCommands


Script 1.6.0 Az.Accounts {Disable-AzDataCollection, Disable-AzContextAutosave, Enable-AzDataCollection, Enable-AzContextAutosave...}
Script 1.5.3 Az.Accounts {Disable-AzDataCollection, Disable-AzContextAutosave, Enable-AzDataCollection, Enable-AzContextAutosave...}
Script 1.1.0 Az.Accounts {Disable-AzDataCollection, Disable-AzContextAutosave, Enable-AzDataCollection, Enable-AzContextAutosave...}
Script 1.0.0 Az.Advisor {Get-AzAdvisorRecommendation, Enable-AzAdvisorRecommendation, Disable-AzAdvisorRecommendation, Get-AzAdvisorConfiguration...}
Script 1.0.1 Az.Aks {Get-AzAks, New-AzAks, Remove-AzAks, Import-AzAksCredential...}
Script 1.0.0 Az.Aks {Get-AzAks, New-AzAks, Remove-AzAks, Import-AzAksCredential...}
Script 1.1.0 Az.AnalysisServices {Resume-AzAnalysisServicesServer, Suspend-AzAnalysisServicesServer, Get-AzAnalysisServicesServer, Remove-AzAnalysisServicesServer...}
Script 1.0.0 Az.AnalysisServices {Resume-AzAnalysisServicesServer, Suspend-AzAnalysisServicesServer, Get-AzAnalysisServicesServer, Remove-AzAnalysisServicesServer...}
Script 1.2.0 Az.ApiManagement {Add-AzApiManagementApiToProduct, Add-AzApiManagementProductToGroup, Add-AzApiManagementRegion, Add-AzApiManagementUserToGroup...}
Script 1.1.0 Az.ApiManagement {Add-AzApiManagementApiToProduct, Add-AzApiManagementProductToGroup, Add-AzApiManagementRegion, Add-AzApiManagementUserToGroup...}
Script 1.0.0 Az.ApiManagement {Add-AzApiManagementRegion, Get-AzApiManagementSsoToken, New-AzApiManagementCustomHostnameConfiguration, New-AzApiManagementSystemCertificate...}
Script 1.0.0 Az.ApplicationInsights {Get-AzApplicationInsights, New-AzApplicationInsights, Remove-AzApplicationInsights, Set-AzApplicationInsightsPricingPlan...}
Script 1.3.0 Az.Automation {Get-AzAutomationHybridWorkerGroup, Remove-AzAutomationHybridWorkerGroup, Get-AzAutomationJobOutputRecord, Import-AzAutomationDscNodeConfiguration...}
Script 1.2.2 Az.Automation {Get-AzAutomationHybridWorkerGroup, Remove-AzAutomationHybridWorkerGroup, Get-AzAutomationJobOutputRecord, Import-AzAutomationDscNodeConfiguration...}
Script 1.0.0 Az.Automation {Get-AzAutomationHybridWorkerGroup, Remove-AzAutomationHybridWorkerGroup, Get-AzAutomationJobOutputRecord, Import-AzAutomationDscNodeConfiguration...}
Script 1.1.0 Az.Batch {Remove-AzBatchAccount, Get-AzBatchAccount, Get-AzBatchAccountKey, New-AzBatchAccount...}
Script 1.0.0 Az.Batch {Remove-AzBatchAccount, Get-AzBatchAccount, Get-AzBatchAccountKeys, New-AzBatchAccount...}
Script 1.0.0 Az.Billing {Get-AzBillingInvoice, Get-AzBillingPeriod, Get-AzEnrollmentAccount, Get-AzConsumptionBudget...}
Script 1.3.0 Az.Cdn {Get-AzCdnProfile, Get-AzCdnProfileSsoUrl, New-AzCdnProfile, Remove-AzCdnProfile...}
Script 1.0.0 Az.Cdn {Get-AzCdnProfile, Get-AzCdnProfileSsoUrl, New-AzCdnProfile, Remove-AzCdnProfile...}
Script 1.1.1 Az.CognitiveServices {Get-AzCognitiveServicesAccount, Get-AzCognitiveServicesAccountKey, Get-AzCognitiveServicesAccountSku, Get-AzCognitiveServicesAccountType...}
Script 1.0.0 Az.CognitiveServices {Get-AzCognitiveServicesAccount, Get-AzCognitiveServicesAccountKey, Get-AzCognitiveServicesAccountSkus, Get-AzCognitiveServicesAccountType...}
Script 2.4.0 Az.Compute {Remove-AzAvailabilitySet, Get-AzAvailabilitySet, New-AzAvailabilitySet, Update-AzAvailabilitySet...}
Script 2.3.0 Az.Compute {Remove-AzAvailabilitySet, Get-AzAvailabilitySet, New-AzAvailabilitySet, Update-AzAvailabilitySet...}
Script 1.1.0 Az.Compute {Remove-AzAvailabilitySet, Get-AzAvailabilitySet, New-AzAvailabilitySet, Update-AzAvailabilitySet...}
Script 1.0.1 Az.ContainerInstance {New-AzContainerGroup, Get-AzContainerGroup, Remove-AzContainerGroup, Get-AzContainerInstanceLog}
Script 1.0.0 Az.ContainerInstance {New-AzContainerGroup, Get-AzContainerGroup, Remove-AzContainerGroup, Get-AzContainerInstanceLog}
Script 1.0.1 Az.ContainerRegistry {New-AzContainerRegistry, Get-AzContainerRegistry, Update-AzContainerRegistry, Remove-AzContainerRegistry...}
Script 1.0.0 Az.ContainerRegistry {New-AzContainerRegistry, Get-AzContainerRegistry, Update-AzContainerRegistry, Remove-AzContainerRegistry...}
Script 1.1.2 Az.DataFactory {Set-AzDataFactoryV2, Update-AzDataFactoryV2, Get-AzDataFactoryV2, Remove-AzDataFactoryV2...}
Script 1.1.1 Az.DataFactory {Set-AzDataFactoryV2, Update-AzDataFactoryV2, Get-AzDataFactoryV2, Remove-AzDataFactoryV2...}
Script 1.0.0 Az.DataFactory {Set-AzDataFactoryV2, Update-AzDataFactoryV2, Get-AzDataFactoryV2, Remove-AzDataFactoryV2...}
Script 1.0.0 Az.DataLakeAnalytics {Get-AzDataLakeAnalyticsDataSource, New-AzDataLakeAnalyticsCatalogCredential, Remove-AzDataLakeAnalyticsCatalogCredential, Set-AzDataLakeAnalyticsCatalogCredential...
Script 1.2.1 Az.DataLakeStore {Get-AzDataLakeStoreTrustedIdProvider, Remove-AzDataLakeStoreTrustedIdProvider, Remove-AzDataLakeStoreFirewallRule, Set-AzDataLakeStoreTrustedIdProvider...}
Script 1.0.1 Az.DataLakeStore {Get-AzDataLakeStoreTrustedIdProvider, Remove-AzDataLakeStoreTrustedIdProvider, Remove-AzDataLakeStoreFirewallRule, Set-AzDataLakeStoreTrustedIdProvider...}
Script 1.0.0 Az.DeploymentManager {Get-AzDeploymentManagerArtifactSource, New-AzDeploymentManagerArtifactSource, Set-AzDeploymentManagerArtifactSource, Remove-AzDeploymentManagerArtifactSource...}
Script 1.0.0 Az.DevTestLabs {Get-AzDtlAllowedVMSizesPolicy, Get-AzDtlAutoShutdownPolicy, Get-AzDtlAutoStartPolicy, Get-AzDtlVMsPerLabPolicy...}
Script 1.1.1 Az.Dns {Get-AzDnsRecordSet, New-AzDnsRecordConfig, Remove-AzDnsRecordSet, Set-AzDnsRecordSet...}
Script 1.0.0 Az.Dns {Get-AzDnsRecordSet, New-AzDnsRecordConfig, Remove-AzDnsRecordSet, Set-AzDnsRecordSet...}
Script 1.2.1 Az.EventGrid {New-AzEventGridTopic, Get-AzEventGridTopic, Set-AzEventGridTopic, New-AzEventGridTopicKey...}
Script 1.2.0 Az.EventGrid {New-AzEventGridTopic, Get-AzEventGridTopic, Set-AzEventGridTopic, New-AzEventGridTopicKey...}
Script 1.1.0 Az.EventGrid {New-AzEventGridTopic, Get-AzEventGridTopic, Set-AzEventGridTopic, New-AzEventGridTopicKey...}
Script 1.2.0 Az.EventHub {New-AzEventHubNamespace, Get-AzEventHubNamespace, Set-AzEventHubNamespace, Remove-AzEventHubNamespace...}
Script 1.0.0 Az.EventHub {New-AzEventHubNamespace, Get-AzEventHubNamespace, Set-AzEventHubNamespace, Remove-AzEventHubNamespace...}
Script 1.1.0 Az.FrontDoor {New-AzFrontDoor, Get-AzFrontDoor, Set-AzFrontDoor, Remove-AzFrontDoor...}
Script 2.0.0 Az.HDInsight {Get-AzHDInsightJob, New-AzHDInsightSqoopJobDefinition, Wait-AzHDInsightJob, New-AzHDInsightStreamingMapReduceJobDefinition...}
Script 1.0.0 Az.HDInsight {Get-AzHDInsightJob, New-AzHDInsightSqoopJobDefinition, Wait-AzHDInsightJob, New-AzHDInsightStreamingMapReduceJobDefinition...}
Script 1.2.0 Az.IotHub {Add-AzIotHubKey, Get-AzIotHubEventHubConsumerGroup, Get-AzIotHubConnectionString, Get-AzIotHubJob...}
Script 1.1.0 Az.IotHub {Add-AzIotHubKey, Get-AzIotHubEventHubConsumerGroup, Get-AzIotHubConnectionString, Get-AzIotHubJob...}
Script 1.0.1 Az.IotHub {Add-AzIotHubKey, Get-AzIotHubEventHubConsumerGroup, Get-AzIotHubConnectionString, Get-AzIotHubJob...}
Script 1.2.0 Az.KeyVault {Add-AzKeyVaultCertificate, Update-AzKeyVaultCertificate, Stop-AzKeyVaultCertificateOperation, Get-AzKeyVaultCertificateOperation...}
Script 1.0.0 Az.KeyVault {Add-AzKeyVaultCertificate, Update-AzKeyVaultCertificate, Stop-AzKeyVaultCertificateOperation, Get-AzKeyVaultCertificateOperation...}
Script 1.2.1 Az.LogicApp {Get-AzIntegrationAccountAgreement, Get-AzIntegrationAccountAssembly, Get-AzIntegrationAccountBatchConfiguration, Get-AzIntegrationAccountCallbackUrl...}
Script 1.1.0 Az.LogicApp {Get-AzIntegrationAccountAgreement, Get-AzIntegrationAccountCallbackUrl, Get-AzIntegrationAccountCertificate, Get-AzIntegrationAccount...}
Script 1.1.0 Az.MachineLearning {Move-AzMlCommitmentAssociation, Get-AzMlCommitmentAssociation, Get-AzMlCommitmentPlanUsageHistory, Remove-AzMlCommitmentPlan...}
Script 1.0.0 Az.MachineLearning {Move-AzMlCommitmentAssociation, Get-AzMlCommitmentAssociation, Get-AzMlCommitmentPlanUsageHistory, Remove-AzMlCommitmentPlan...}
Script 1.0.0 Az.MarketplaceOrdering {Get-AzMarketplaceTerms, Set-AzMarketplaceTerms}
Script 1.1.0 Az.Media {Sync-AzMediaServiceStorageKey, Set-AzMediaServiceKey, Get-AzMediaServiceKey, Get-AzMediaServiceNameAvailability...}
Script 1.0.0 Az.Media {Sync-AzMediaServiceStorageKeys, Set-AzMediaServiceKey, Get-AzMediaServiceKeys, Get-AzMediaServiceNameAvailability...}
Script 1.2.1 Az.Monitor {Get-AzMetricDefinition, Get-AzMetric, Remove-AzLogProfile, Get-AzLogProfile...}
Script 1.0.0 Az.Monitor {Get-AzMetricDefinition, Get-AzMetric, Remove-AzLogProfile, Get-AzLogProfile...}
Script 1.11.0 Az.Network {Add-AzApplicationGatewayAuthenticationCertificate, Get-AzApplicationGatewayAuthenticationCertificate, New-AzApplicationGatewayAuthenticationCertificate, Remove-Az...
Script 1.10.0 Az.Network {Add-AzApplicationGatewayAuthenticationCertificate, Get-AzApplicationGatewayAuthenticationCertificate, New-AzApplicationGatewayAuthenticationCertificate, Remove-Az...
Script 1.0.0 Az.Network {Add-AzApplicationGatewayAuthenticationCertificate, Get-AzApplicationGatewayAuthenticationCertificate, New-AzApplicationGatewayAuthenticationCertificate, Remove-Az...
Script 1.1.0 Az.NotificationHubs {Get-AzNotificationHub, Get-AzNotificationHubAuthorizationRule, Get-AzNotificationHubListKey, Get-AzNotificationHubPNSCredential...}
Script 1.0.0 Az.NotificationHubs {Get-AzNotificationHub, Get-AzNotificationHubAuthorizationRules, Get-AzNotificationHubListKeys, Get-AzNotificationHubPNSCredentials...}
Script 1.3.1 Az.OperationalInsights {New-AzOperationalInsightsAzureActivityLogDataSource, New-AzOperationalInsightsCustomLogDataSource, Disable-AzOperationalInsightsLinuxCustomLogCollection, Disable-...
Script 1.3.0 Az.OperationalInsights {New-AzOperationalInsightsAzureActivityLogDataSource, New-AzOperationalInsightsCustomLogDataSource, Disable-AzOperationalInsightsLinuxCustomLogCollection, Disable-...
Script 1.0.0 Az.OperationalInsights {New-AzOperationalInsightsAzureActivityLogDataSource, New-AzOperationalInsightsCustomLogDataSource, Disable-AzOperationalInsightsLinuxCustomLogCollection, Disable-...
Script 1.1.2 Az.PolicyInsights {Get-AzPolicyEvent, Get-AzPolicyState, Get-AzPolicyStateSummary, Get-AzPolicyRemediation...}
Script 1.1.1 Az.PolicyInsights {Get-AzPolicyEvent, Get-AzPolicyState, Get-AzPolicyStateSummary, Get-AzPolicyRemediation...}
Script 1.0.0 Az.PolicyInsights {Get-AzPolicyEvent, Get-AzPolicyState, Get-AzPolicyStateSummary, Get-AzPolicyRemediation...}
Script 1.1.0 Az.PowerBIEmbedded {Remove-AzPowerBIWorkspaceCollection, Get-AzPowerBIWorkspaceCollection, Get-AzPowerBIWorkspaceCollectionAccessKey, Get-AzPowerBIWorkspace...}
Script 1.0.0 Az.PowerBIEmbedded {Remove-AzPowerBIWorkspaceCollection, Get-AzPowerBIWorkspaceCollection, Get-AzPowerBIWorkspaceCollectionAccessKeys, Get-AzPowerBIWorkspace...}
Script 1.4.2 Az.RecoveryServices {Get-AzRecoveryServicesBackupProperty, Get-AzRecoveryServicesVault, Get-AzRecoveryServicesVaultSettingsFile, New-AzRecoveryServicesVault...}
Script 1.4.1 Az.RecoveryServices {Get-AzRecoveryServicesBackupProperty, Get-AzRecoveryServicesVault, Get-AzRecoveryServicesVaultSettingsFile, New-AzRecoveryServicesVault...}
Script 1.0.0 Az.RecoveryServices {Get-AzRecoveryServicesBackupProperty, Get-AzRecoveryServicesVault, Get-AzRecoveryServicesVaultSettingsFile, New-AzRecoveryServicesVault...}
Script 1.1.0 Az.RedisCache {Remove-AzRedisCachePatchSchedule, New-AzRedisCacheScheduleEntry, Get-AzRedisCachePatchSchedule, New-AzRedisCachePatchSchedule...}
Script 1.0.0 Az.RedisCache {Remove-AzRedisCachePatchSchedule, New-AzRedisCacheScheduleEntry, Get-AzRedisCachePatchSchedule, New-AzRedisCachePatchSchedule...}
Script 1.0.1 Az.Relay {New-AzRelayNamespace, Get-AzRelayNamespace, Set-AzRelayNamespace, Remove-AzRelayNamespace...}
Script 1.0.0 Az.Relay {New-AzRelayNamespace, Get-AzRelayNamespace, Set-AzRelayNamespace, Remove-AzRelayNamespace...}
Script 1.6.0 Az.Resources {Get-AzProviderOperation, Remove-AzRoleAssignment, Get-AzRoleAssignment, New-AzRoleAssignment...}
Script 1.5.0 Az.Resources {Get-AzProviderOperation, Remove-AzRoleAssignment, Get-AzRoleAssignment, New-AzRoleAssignment...}
Script 1.1.0 Az.Resources {Get-AzProviderOperation, Remove-AzRoleAssignment, Get-AzRoleAssignment, New-AzRoleAssignment...}
Script 1.2.1 Az.ServiceBus {New-AzServiceBusNamespace, Get-AzServiceBusNamespace, Set-AzServiceBusNamespace, Remove-AzServiceBusNamespace...}
Script 1.2.0 Az.ServiceBus {New-AzServiceBusNamespace, Get-AzServiceBusNamespace, Set-AzServiceBusNamespace, Remove-AzServiceBusNamespace...}
Script 1.0.0 Az.ServiceBus {New-AzServiceBusNamespace, Get-AzServiceBusNamespace, Set-AzServiceBusNamespace, Remove-AzServiceBusNamespace...}
Script 1.1.1 Az.ServiceFabric {Add-AzServiceFabricApplicationCertificate, Add-AzServiceFabricClientCertificate, Add-AzServiceFabricClusterCertificate, Add-AzServiceFabricNode...}
Script 1.0.0 Az.ServiceFabric {Add-AzServiceFabricApplicationCertificate, Add-AzServiceFabricClientCertificate, Add-AzServiceFabricClusterCertificate, Add-AzServiceFabricNode...}
Script 1.0.2 Az.SignalR {New-AzSignalR, Get-AzSignalR, Get-AzSignalRKey, New-AzSignalRKey...}
Script 1.0.1 Az.SignalR {New-AzSignalR, Get-AzSignalR, Get-AzSignalRKey, New-AzSignalRKey...}
Script 1.13.0 Az.Sql {Get-AzSqlDatabaseTransparentDataEncryption, Get-AzSqlDatabaseTransparentDataEncryptionActivity, Set-AzSqlDatabaseTransparentDataEncryption, Get-AzSqlDatabaseUpgra...
Script 1.12.0 Az.Sql {Get-AzSqlDatabaseTransparentDataEncryption, Get-AzSqlDatabaseTransparentDataEncryptionActivity, Set-AzSqlDatabaseTransparentDataEncryption, Get-AzSqlDatabaseUpgra...
Script 1.0.1 Az.Sql {Get-AzSqlDatabaseTransparentDataEncryption, Get-AzSqlDatabaseTransparentDataEncryptionActivity, Set-AzSqlDatabaseTransparentDataEncryption, Get-AzSqlDatabaseUpgra...
Script 1.5.0 Az.Storage {Get-AzStorageAccount, Get-AzStorageAccountKey, New-AzStorageAccount, New-AzStorageAccountKey...}
Script 1.4.0 Az.Storage {Get-AzStorageAccount, Get-AzStorageAccountKey, New-AzStorageAccount, New-AzStorageAccountKey...}
Script 1.0.1 Az.Storage {Get-AzStorageAccount, Get-AzStorageAccountKey, New-AzStorageAccount, New-AzStorageAccountKey...}
Script 1.1.1 Az.StorageSync {Invoke-AzStorageSyncCompatibilityCheck, New-AzStorageSyncService, Get-AzStorageSyncService, Remove-AzStorageSyncService...}
Script 1.0.0 Az.StreamAnalytics {Get-AzStreamAnalyticsFunction, Get-AzStreamAnalyticsDefaultFunctionDefinition, New-AzStreamAnalyticsFunction, Remove-AzStreamAnalyticsFunction...}
Script 1.0.1 Az.TrafficManager {Add-AzTrafficManagerCustomHeaderToEndpoint, Remove-AzTrafficManagerCustomHeaderFromEndpoint, Add-AzTrafficManagerCustomHeaderToProfile, Remove-AzTrafficManagerCus...
Script 1.0.0 Az.TrafficManager {Add-AzTrafficManagerCustomHeaderToEndpoint, Remove-AzTrafficManagerCustomHeaderFromEndpoint, Add-AzTrafficManagerCustomHeaderToProfile, Remove-AzTrafficManagerCus...
Script 1.3.0 Az.Websites {Get-AzAppServicePlan, Set-AzAppServicePlan, New-AzAppServicePlan, Remove-AzAppServicePlan...}
Script 1.0.1 Az.Websites {Get-AzAppServicePlan, Set-AzAppServicePlan, New-AzAppServicePlan, Remove-AzAppServicePlan...}
Script 1.0.1 Microsoft.PowerShell.Operation.V... {Get-OperationValidation, Invoke-OperationValidation}
Binary 1.0.0.1 PackageManagement {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...}
Script 3.4.0 Pester {Describe, Context, It, Should...}
Script 1.0.0.1 PowerShellGet {Install-Module, Find-Module, Save-Module, Update-Module...}
Script 2.0.0 PSReadline {Get-PSReadLineKeyHandler, Set-PSReadLineKeyHandler, Remove-PSReadLineKeyHandler, Get-PSReadLineOption...}

Debug output

Wasn't able to grab at the time.

Error output

No error visible.

@markcowl

This comment has been minimized.

Copy link
Member

commented Jul 25, 2019

@LucianFrango Can you provide the debug stream trace - this shows the client/server communication, and may be necessary to help diagnose the issue.

@LucianFrango

This comment has been minimized.

Copy link
Author

commented Jul 28, 2019

My apologies for the delay.
I've quickly created a test VNET in a DEV subscription and removed any identifiers from the output.

Debug output:

PS C:\Users\Lucian> $VNET = Get-AzVirtualNetwork -Name LUCIAN-TEST-VNET -ResourceGroupName LJUCIAN-TEST
Set-AzVirtualNetworkSubnetConfig -VirtualNetwork $VNET -Name default -AddressPrefix 192.168.0.0/24 -RouteTable $null | Set-AzVirtualNetwork -Debug
WARNING: Breaking changes in the cmdlet 'Set-AzVirtualNetworkSubnetConfig' :
WARNING: - Update Property Name

WARNING: Cmdlet invocation changes :
Old Way : -ResourceId
New Way : -NatGatewayId
WARNING: - Update Property Name

WARNING: Cmdlet invocation changes :
Old Way : -InputObject
New Way : -NatGateway
WARNING: NOTE : Go to https://aka.ms/azps-changewarnings for steps to suppress this breaking change warning, and other information on breaking changes in Azure PowerShell.
DEBUG: 8:33:31 AM - SetAzureVirtualNetworkCommand begin processing with ParameterSet '__AllParameterSets'.
DEBUG: 8:33:33 AM - using account id 'lucian@<mytenant.onmicrosoft.com>'...
DEBUG: [Common.Authentication]: Authenticating using Account: 'lucian@<mytenant.onmicrosoft.com>', environment: 'AzureCloud', tenant: ''
DEBUG: [Common.Authentication]: Authenticating using configuration values: Domain: '', Endpoint: 'https://login.microsoftonline.com/', ClientId: '1950a258-227b-4e31-a9cf-717495945fc2', ClientRedirect: 'urn:ietf
:wg:oauth:2.0:oob', ResourceClientUri: 'https://management.core.windows.net/', ValidateAuthority: 'True'
DEBUG: [Common.Authentication]: Acquiring token using context with Authority 'https://login.microsoftonline.com//', CorrelationId: '00000000-0000-0000-0000-000000000000', ValidateAuthority: 'True'
DEBUG: [Common.Authentication]: Acquiring token using AdalConfiguration with Domain: '', AdEndpoint: 'https://login.microsoftonline.com/', ClientId: '1950a258-227b-4e31-a9cf-717495945fc2', ClientRedirectUri: ur
n:ietf:wg:oauth:2.0:oob
DEBUG: [ADAL]: Information: 2019-07-28T22:33:33.2279459Z: e2ca40e6-e363-46b1-8dd1-31d9f83e82b7 - LoggerBase.cs: ADAL PCL.Desktop with assembly version '3.19.2.6005', file version '3.19.50302.0130' and informational version '2a8bec6c4c76d0c1ef819b
55bdc3cda2d2605056' is running...

DEBUG: [ADAL]: Information: 2019-07-28T22:33:33.2279459Z: e2ca40e6-e363-46b1-8dd1-31d9f83e82b7 - LoggerBase.cs: ADAL PCL.Desktop with assembly version '3.19.2.6005', file version '3.19.50302.0130' and informational version '2a8bec6c4c76d0c1ef819b
55bdc3cda2d2605056' is running...

DEBUG: [ADAL]: Information: 2019-07-28T22:33:33.2279459Z: e2ca40e6-e363-46b1-8dd1-31d9f83e82b7 - LoggerBase.cs: === Token Acquisition started:
CacheType: null
Authentication Target: User
, Authority Host: login.microsoftonline.com

DEBUG: [ADAL]: Information: 2019-07-28T22:33:33.2279459Z: e2ca40e6-e363-46b1-8dd1-31d9f83e82b7 - LoggerBase.cs: === Token Acquisition started:
Authority: https://login.microsoftonline.com//
Resource: https://management.core.windows.net/
ClientId: 1950a258-227b-4e31-a9cf-717495945fc2
CacheType: null
Authentication Target: User

DEBUG: [ADAL]: Verbose: 2019-07-28T22:33:33.2279459Z: e2ca40e6-e363-46b1-8dd1-31d9f83e82b7 - LoggerBase.cs: Loading from cache.

DEBUG: [ADAL]: Verbose: 2019-07-28T22:33:33.2279459Z: e2ca40e6-e363-46b1-8dd1-31d9f83e82b7 - LoggerBase.cs: Loading from cache.

DEBUG: [ADAL]: Information: 2019-07-28T22:33:33.2279459Z: 00000000-0000-0000-0000-000000000000 - LoggerBase.cs: Deserialized 7 items to token cache.

DEBUG: [ADAL]: Verbose: 2019-07-28T22:33:33.2279459Z: e2ca40e6-e363-46b1-8dd1-31d9f83e82b7 - LoggerBase.cs: Looking up cache for a token...

DEBUG: [ADAL]: Verbose: 2019-07-28T22:33:33.2279459Z: e2ca40e6-e363-46b1-8dd1-31d9f83e82b7 - LoggerBase.cs: Looking up cache for a token...

DEBUG: [ADAL]: Information: 2019-07-28T22:33:33.2279459Z: e2ca40e6-e363-46b1-8dd1-31d9f83e82b7 - LoggerBase.cs: An item matching the requested resource was found in the cache

DEBUG: [ADAL]: Information: 2019-07-28T22:33:33.2279459Z: e2ca40e6-e363-46b1-8dd1-31d9f83e82b7 - LoggerBase.cs: An item matching the requested resource was found in the cache

DEBUG: [ADAL]: Information: 2019-07-28T22:33:33.2279459Z: e2ca40e6-e363-46b1-8dd1-31d9f83e82b7 - LoggerBase.cs: 45.5579009016667 minutes left until token in cache expires

DEBUG: [ADAL]: Information: 2019-07-28T22:33:33.2279459Z: e2ca40e6-e363-46b1-8dd1-31d9f83e82b7 - LoggerBase.cs: 45.5579009016667 minutes left until token in cache expires

DEBUG: [ADAL]: Information: 2019-07-28T22:33:33.2279459Z: e2ca40e6-e363-46b1-8dd1-31d9f83e82b7 - LoggerBase.cs: A matching item (access token or refresh token or both) was found in the cache

DEBUG: [ADAL]: Information: 2019-07-28T22:33:33.2279459Z: e2ca40e6-e363-46b1-8dd1-31d9f83e82b7 - LoggerBase.cs: A matching item (access token or refresh token or both) was found in the cache

DEBUG: [ADAL]: Information: 2019-07-28T22:33:33.2279459Z: e2ca40e6-e363-46b1-8dd1-31d9f83e82b7 - LoggerBase.cs: === Token Acquisition finished successfully. An access token was returned: Expiration Time: 28/07/2019 11:19:06 PM +00:00

DEBUG: [ADAL]: Information: 2019-07-28T22:33:33.2279459Z: e2ca40e6-e363-46b1-8dd1-31d9f83e82b7 - LoggerBase.cs: === Token Acquisition finished successfully. An access token was returned: Expiration Time: 28/07/2019 11:19:06 PM +00:00Access Token
Hash: ra43gR6K1tvemuYqfXoEmWCwvCeLtHlzZHcLV4kmrAQ=
User id: 84b17499-1d01-486e-b49c-5435372954cd

DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '07/28/2019 23:19:06 +00:00', MultipleResource? 'True', Tenant: '', UserId: 'lucian@<mytenant.onmicrosoft.com>'
DEBUG: [Common.Authentication]: User info for token DisplayId: 'lucian@<mytenant.onmicrosoft.com>', Name: , IdProvider: 'https://sts.windows.net//', Uid: '84b17499-1d01-486e-b49c-5435372954cd'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '07/28/2019 23:19:06 +00:00' Comparing to '07/28/2019 22:33:33 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:45:33.4740541'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions//resourceGroups/LJUCIAN-TEST/providers/Microsoft.Network/virtualNetworks/LUCIAN-TEST-VNET?api-version=2019-04-01

Headers:
x-ms-client-request-id : 99efe4ec-0270-43c6-89ed-4938e3ae927e
accept-language : en-US

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma : no-cache
x-ms-request-id : 420f41e9-058e-4fbb-8644-ac8c2e35f61b
x-ms-correlation-request-id : 128649dd-eceb-4b9b-9388-b851fe41a893
x-ms-arm-service-request-id : 3cf5ed6c-5f16-484e-bfdb-6082a63e5cc4
Strict-Transport-Security : max-age=31536000; includeSubDomains
Cache-Control : no-cache
ETag : W/"bc541355-8c8e-4d1a-8770-fe45c44bea3e"
Server : Microsoft-HTTPAPI/2.0,Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-reads: 11999
x-ms-routing-request-id : CANADAEAST:20190728T223334Z:128649dd-eceb-4b9b-9388-b851fe41a893
X-Content-Type-Options : nosniff
Date : Sun, 28 Jul 2019 22:33:33 GMT

Body:
{
"name": "LUCIAN-TEST-VNET",
"id": "/subscriptions//resourceGroups/LJUCIAN-TEST/providers/Microsoft.Network/virtualNetworks/LUCIAN-TEST-VNET",
"etag": "W/"bc541355-8c8e-4d1a-8770-fe45c44bea3e"",
"type": "Microsoft.Network/virtualNetworks",
"location": "australiasoutheast",
"properties": {
"provisioningState": "Succeeded",
"resourceGuid": "4222f9b4-788c-4d78-9763-80be3945d5f5",
"addressSpace": {
"addressPrefixes": [
"192.168.0.0/20"
]
},
"subnets": [
{
"name": "default",
"id": "/subscriptions//resourceGroups/LJUCIAN-TEST/providers/Microsoft.Network/virtualNetworks/LUCIAN-TEST-VNET/subnets/default",
"etag": "W/"bc541355-8c8e-4d1a-8770-fe45c44bea3e"",
"properties": {
"provisioningState": "Succeeded",
"addressPrefix": "192.168.0.0/24",
"routeTable": {
"id": "/subscriptions//resourceGroups/LJUCIAN-TEST/providers/Microsoft.Network/routeTables/LucianTestRouteTable"
},
"serviceEndpoints": [],
"delegations": [],
"privateEndpointNetworkPolicies": "Enabled",
"privateLinkServiceNetworkPolicies": "Enabled"
},
"type": "Microsoft.Network/virtualNetworks/subnets"
}
],
"virtualNetworkPeerings": [],
"enableDdosProtection": false,
"enableVmProtection": false
}
}

DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '07/28/2019 23:19:06 +00:00', MultipleResource? 'True', Tenant: '', UserId: 'lucian@<mytenant.onmicrosoft.com>'
DEBUG: [Common.Authentication]: User info for token DisplayId: 'lucian@<mytenant.onmicrosoft.com>', Name: , IdProvider: 'https://sts.windows.net//', Uid: '84b17499-1d01-486e-b49c-5435372954cd'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '07/28/2019 23:19:06 +00:00' Comparing to '07/28/2019 22:33:35 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:45:31.3362531'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
PUT

Absolute Uri:
https://management.azure.com/subscriptions//resourceGroups/LJUCIAN-TEST/providers/Microsoft.Network/virtualNetworks/LUCIAN-TEST-VNET?api-version=2019-04-01

Headers:
x-ms-client-request-id : d37b8a99-4f03-496a-a38a-fde0f3f6f673
accept-language : en-US

Body:
{
"properties": {
"addressSpace": {
"addressPrefixes": [
"192.168.0.0/20"
]
},
"dhcpOptions": {
"dnsServers": []
},
"subnets": [
{
"properties": {
"addressPrefix": "192.168.0.0/24",
"addressPrefixes": [],
"routeTable": {
"properties": {
"routes": [],
"disableBgpRoutePropagation": false
},
"id": "/subscriptions//resourceGroups/LJUCIAN-TEST/providers/Microsoft.Network/routeTables/LucianTestRouteTable",
"tags": {}
},
"serviceEndpoints": [],
"serviceEndpointPolicies": [],
"resourceNavigationLinks": [],
"serviceAssociationLinks": [],
"delegations": [],
"provisioningState": "Succeeded"
},
"name": "default",
"etag": "W/"bc541355-8c8e-4d1a-8770-fe45c44bea3e"",
"id": "/subscriptions//resourceGroups/LJUCIAN-TEST/providers/Microsoft.Network/virtualNetworks/LUCIAN-TEST-VNET/subnets/default"
}
],
"virtualNetworkPeerings": [],
"resourceGuid": "4222f9b4-788c-4d78-9763-80be3945d5f5",
"provisioningState": "Succeeded",
"enableDdosProtection": false
},
"etag": "W/"bc541355-8c8e-4d1a-8770-fe45c44bea3e"",
"id": "/subscriptions//resourceGroups/LJUCIAN-TEST/providers/Microsoft.Network/virtualNetworks/LUCIAN-TEST-VNET",
"location": "australiasoutheast"
}

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma : no-cache
Retry-After : 3
x-ms-request-id : 29a03e1b-9461-46b4-ad93-3f3696322f1d
Azure-AsyncOperation : https://management.azure.com/subscriptions//providers/Microsoft.Network/locations/australiasoutheast/operations/29a03e1b-9461-46b4-ad93-3f3696322f1d?api-version=2019-04-01
x-ms-correlation-request-id : e2dfa82b-f6f5-4429-858e-51dbedffd430
x-ms-arm-service-request-id : 2129a241-b372-4d81-9527-f20eba4cadeb
Strict-Transport-Security : max-age=31536000; includeSubDomains
Cache-Control : no-cache
Server : Microsoft-HTTPAPI/2.0,Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-writes: 1199
x-ms-routing-request-id : CANADAEAST:20190728T223335Z:e2dfa82b-f6f5-4429-858e-51dbedffd430
X-Content-Type-Options : nosniff
Date : Sun, 28 Jul 2019 22:33:34 GMT

Body:
{
"name": "LUCIAN-TEST-VNET",
"id": "/subscriptions//resourceGroups/LJUCIAN-TEST/providers/Microsoft.Network/virtualNetworks/LUCIAN-TEST-VNET",
"etag": "W/"56c59946-7d40-42dd-8e27-08dee723c86a"",
"type": "Microsoft.Network/virtualNetworks",
"location": "australiasoutheast",
"properties": {
"provisioningState": "Updating",
"resourceGuid": "4222f9b4-788c-4d78-9763-80be3945d5f5",
"addressSpace": {
"addressPrefixes": [
"192.168.0.0/20"
]
},
"dhcpOptions": {
"dnsServers": []
},
"subnets": [
{
"name": "default",
"id": "/subscriptions//resourceGroups/LJUCIAN-TEST/providers/Microsoft.Network/virtualNetworks/LUCIAN-TEST-VNET/subnets/default",
"etag": "W/"56c59946-7d40-42dd-8e27-08dee723c86a"",
"properties": {
"provisioningState": "Updating",
"addressPrefix": "192.168.0.0/24",
"routeTable": {
"id": "/subscriptions//resourceGroups/LJUCIAN-TEST/providers/Microsoft.Network/routeTables/LucianTestRouteTable"
},
"serviceEndpoints": [],
"delegations": [],
"privateEndpointNetworkPolicies": "Enabled",
"privateLinkServiceNetworkPolicies": "Enabled"
},
"type": "Microsoft.Network/virtualNetworks/subnets"
}
],
"virtualNetworkPeerings": [],
"enableDdosProtection": false,
"enableVmProtection": false
}
}

DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '07/28/2019 23:19:06 +00:00', MultipleResource? 'True', Tenant: '', UserId: 'lucian@<mytenant.onmicrosoft.com>'
DEBUG: [Common.Authentication]: User info for token DisplayId: 'lucian@<mytenant.onmicrosoft.com>', Name: , IdProvider: 'https://sts.windows.net//', Uid: '84b17499-1d01-486e-b49c-5435372954cd'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '07/28/2019 23:19:06 +00:00' Comparing to '07/28/2019 22:33:39 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:45:27.1004029'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions//providers/Microsoft.Network/locations/australiasoutheast/operations/29a03e1b-9461-46b4-ad93-3f3696322f1d?api-version=2019-04-01

Headers:

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma : no-cache
x-ms-request-id : 433deaf1-06ee-478c-99fc-2f8028dd2c14
x-ms-correlation-request-id : b2c40a28-525c-4e3b-84fb-8b1f61b5e56c
x-ms-arm-service-request-id : f93fc878-b120-423c-944d-1edd7a2cce09
Strict-Transport-Security : max-age=31536000; includeSubDomains
Cache-Control : no-cache
Server : Microsoft-HTTPAPI/2.0,Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-reads: 11998
x-ms-routing-request-id : CANADAEAST:20190728T223339Z:b2c40a28-525c-4e3b-84fb-8b1f61b5e56c
X-Content-Type-Options : nosniff
Date : Sun, 28 Jul 2019 22:33:39 GMT

Body:
{
"status": "Succeeded"
}

DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '07/28/2019 23:19:06 +00:00', MultipleResource? 'True', Tenant: '', UserId: 'lucian@<mytenant.onmicrosoft.com>'
DEBUG: [Common.Authentication]: User info for token DisplayId: 'lucian@<mytenant.onmicrosoft.com>', Name: , IdProvider: 'https://sts.windows.net//', Uid: '84b17499-1d01-486e-b49c-5435372954cd'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '07/28/2019 23:19:06 +00:00' Comparing to '07/28/2019 22:33:40 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:45:25.8429678'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions//resourceGroups/LJUCIAN-TEST/providers/Microsoft.Network/virtualNetworks/LUCIAN-TEST-VNET?api-version=2019-04-01

Headers:

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma : no-cache
x-ms-request-id : 581fea4d-cfeb-4dc8-a0be-be2ff9558ae2
x-ms-correlation-request-id : 6a1b6351-e28d-4fbd-a058-578e8c88dc15
x-ms-arm-service-request-id : 345c554b-ea3b-4bea-bb6e-77ed7e3a10c1
Strict-Transport-Security : max-age=31536000; includeSubDomains
Cache-Control : no-cache
ETag : W/"8986816a-b44b-4760-8302-231d3a3e9e73"
Server : Microsoft-HTTPAPI/2.0,Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-reads: 11997
x-ms-routing-request-id : CANADAEAST:20190728T223340Z:6a1b6351-e28d-4fbd-a058-578e8c88dc15
X-Content-Type-Options : nosniff
Date : Sun, 28 Jul 2019 22:33:39 GMT

Body:
{
"name": "LUCIAN-TEST-VNET",
"id": "/subscriptions//resourceGroups/LJUCIAN-TEST/providers/Microsoft.Network/virtualNetworks/LUCIAN-TEST-VNET",
"etag": "W/"8986816a-b44b-4760-8302-231d3a3e9e73"",
"type": "Microsoft.Network/virtualNetworks",
"location": "australiasoutheast",
"properties": {
"provisioningState": "Succeeded",
"resourceGuid": "4222f9b4-788c-4d78-9763-80be3945d5f5",
"addressSpace": {
"addressPrefixes": [
"192.168.0.0/20"
]
},
"dhcpOptions": {
"dnsServers": []
},
"subnets": [
{
"name": "default",
"id": "/subscriptions//resourceGroups/LJUCIAN-TEST/providers/Microsoft.Network/virtualNetworks/LUCIAN-TEST-VNET/subnets/default",
"etag": "W/"8986816a-b44b-4760-8302-231d3a3e9e73"",
"properties": {
"provisioningState": "Succeeded",
"addressPrefix": "192.168.0.0/24",
"routeTable": {
"id": "/subscriptions//resourceGroups/LJUCIAN-TEST/providers/Microsoft.Network/routeTables/LucianTestRouteTable"
},
"serviceEndpoints": [],
"delegations": [],
"privateEndpointNetworkPolicies": "Enabled",
"privateLinkServiceNetworkPolicies": "Enabled"
},
"type": "Microsoft.Network/virtualNetworks/subnets"
}
],
"virtualNetworkPeerings": [],
"enableDdosProtection": false,
"enableVmProtection": false
}
}

DEBUG: [Common.Authentication]: Renewing Token with Type: 'Bearer', Expiry: '07/28/2019 23:19:06 +00:00', MultipleResource? 'True', Tenant: '', UserId: 'lucian@<mytenant.onmicrosoft.com>'
DEBUG: [Common.Authentication]: User info for token DisplayId: 'lucian@<mytenant.onmicrosoft.com>', Name: , IdProvider: 'https://sts.windows.net//', Uid: '84b17499-1d01-486e-b49c-5435372954cd'
DEBUG: [Common.Authentication]: Checking token expiration, token expires '07/28/2019 23:19:06 +00:00' Comparing to '07/28/2019 22:33:41 +00:00' With threshold '00:05:00', calculated time until token expiry: '00:45:25.3502976'
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions//resourceGroups/LJUCIAN-TEST/providers/Microsoft.Network/virtualNetworks/LUCIAN-TEST-VNET?api-version=2019-04-01

Headers:
x-ms-client-request-id : 26d0a98b-b935-438a-93e3-636766ac668a
accept-language : en-US

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
OK

Headers:
Pragma : no-cache
x-ms-request-id : b7bb0eb5-4fce-4e11-9bab-e4e620136df5
x-ms-correlation-request-id : e5b174e3-6db7-487d-8f82-ad3e7c5dc784
x-ms-arm-service-request-id : 9d370b68-79c7-4c70-970d-f2443099da20
Strict-Transport-Security : max-age=31536000; includeSubDomains
Cache-Control : no-cache
ETag : W/"8986816a-b44b-4760-8302-231d3a3e9e73"
Server : Microsoft-HTTPAPI/2.0,Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-reads: 11996
x-ms-routing-request-id : CANADAEAST:20190728T223340Z:e5b174e3-6db7-487d-8f82-ad3e7c5dc784
X-Content-Type-Options : nosniff
Date : Sun, 28 Jul 2019 22:33:40 GMT

Body:
{
"name": "LUCIAN-TEST-VNET",
"id": "/subscriptions//resourceGroups/LJUCIAN-TEST/providers/Microsoft.Network/virtualNetworks/LUCIAN-TEST-VNET",
"etag": "W/"8986816a-b44b-4760-8302-231d3a3e9e73"",
"type": "Microsoft.Network/virtualNetworks",
"location": "australiasoutheast",
"properties": {
"provisioningState": "Succeeded",
"resourceGuid": "4222f9b4-788c-4d78-9763-80be3945d5f5",
"addressSpace": {
"addressPrefixes": [
"192.168.0.0/20"
]
},
"dhcpOptions": {
"dnsServers": []
},
"subnets": [
{
"name": "default",
"id": "/subscriptions//resourceGroups/LJUCIAN-TEST/providers/Microsoft.Network/virtualNetworks/LUCIAN-TEST-VNET/subnets/default",
"etag": "W/"8986816a-b44b-4760-8302-231d3a3e9e73"",
"properties": {
"provisioningState": "Succeeded",
"addressPrefix": "192.168.0.0/24",
"routeTable": {
"id": "/subscriptions//resourceGroups/LJUCIAN-TEST/providers/Microsoft.Network/routeTables/LucianTestRouteTable"
},
"serviceEndpoints": [],
"delegations": [],
"privateEndpointNetworkPolicies": "Enabled",
"privateLinkServiceNetworkPolicies": "Enabled"
},
"type": "Microsoft.Network/virtualNetworks/subnets"
}
],
"virtualNetworkPeerings": [],
"enableDdosProtection": false,
"enableVmProtection": false
}
}

Name : LUCIAN-TEST-VNET
ResourceGroupName : LJUCIAN-TEST
Location : australiasoutheast
Id : /subscriptions//resourceGroups/LJUCIAN-TEST/providers/Microsoft.Network/virtualNetworks/LUCIAN-TEST-VNET
Etag : W/"8986816a-b44b-4760-8302-231d3a3e9e73"
ResourceGuid : 4222f9b4-788c-4d78-9763-80be3945d5f5
ProvisioningState : Succeeded
Tags :
AddressSpace : {
"AddressPrefixes": [
"192.168.0.0/20"
]
}
DhcpOptions : {
"DnsServers": []
}
Subnets : [
{
"Delegations": [],
"Name": "default",
"Etag": "W/"8986816a-b44b-4760-8302-231d3a3e9e73"",
"Id": "/subscriptions//resourceGroups/LJUCIAN-TEST/providers/Microsoft.Network/virtualNetworks/LUCIAN-TEST-VNET/subnets/default",
"AddressPrefix": [
"192.168.0.0/24"
],
"IpConfigurations": [],
"ServiceAssociationLinks": [],
"ResourceNavigationLinks": [],
"RouteTable": {
"DisableBgpRoutePropagation": false,
"Id": "/subscriptions//resourceGroups/LJUCIAN-TEST/providers/Microsoft.Network/routeTables/LucianTestRouteTable"
},
"ServiceEndpoints": [],
"ServiceEndpointPolicies": [],
"PrivateEndpoints": [],
"ProvisioningState": "Succeeded"
}
]
VirtualNetworkPeerings : []
EnableDdosProtection : false
DdosProtectionPlan : null

DEBUG: AzureQoSEvent: CommandName - Set-AzVirtualNetwork; IsSuccess - True; Duration - 00:00:10.9251417; Exception - ;
DEBUG: Finish sending metric.
DEBUG: 8:33:42 AM - SetAzureVirtualNetworkCommand end processing.
DEBUG: 8:33:42 AM - SetAzureVirtualNetworkCommand end processing.

@number213

This comment has been minimized.

Copy link
Contributor

commented Jul 29, 2019

Set for subnet only updates RouteTable if it's not null (https://github.com/Azure/azure-powershell/blob/master/src/Network/Network/VirtualNetwork/Subnet/SetAzureVirtualNetworkSubnetConfigCommand.cs#L58). I guess this is done to avoid customer having to provide all parameters each time they want to update the resource.

Can you try editing subnet object manually?

$vnet = Get-AzVirtualNetwork -Name LUCIAN-TEST-VNET -ResourceGroupName LJUCIAN-TEST
$subnet = Get-AzVirtualNetworkSubnetConfig -VirtualNetwork $vnet -Name default
$subnet.RouteTable = $null
Set-AzVirtualNetwork -VirtualNetwork $vnet
@LucianFrango

This comment has been minimized.

Copy link
Author

commented Jul 29, 2019

Thanks @number213, that does it. There isn't much in the way of disassociating a RouteTable via PS, so I was trying to use the AzureRM PS equivalent cmdlet with AzureAz.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.