You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@alinedutrasilva
Thank you for sharing your feedback.
From the images shared above seems like you are trying to add an address space to your virtual network. The required PowerShell commands are currently documented here. Thank you!
Hello Team,
I have noticed that this page did not mention the possibility of change the Vnet prefix via PowerShell.
Indeed, via Azure Portal does not allow it due to validation:
However, if you perform the same action via PowerShell, it allows you to change the same Vnet without any issue:
$virtualNetwork = Get-AzVirtualNetwork -ResourceGroupName testvnet -Name testvnet
$virtualNetwork.AddressSpace.AddressPrefixes.Remove("10.230.195.0/24")
True
$virtualNetwork.AddressSpace.AddressPrefixes.Add("10.230.195.0/26")
$virtualNetwork.AddressSpace.AddressPrefixes.Add("10.230.195.64/26")
Set-AzVirtualNetwork -VirtualNetwork $virtualNetwork
Documentation:
https://learn.microsoft.com/en-us/azure/virtual-network/virtual-network-manage-subnet
https://learn.microsoft.com/en-us/azure/virtual-network/manage-virtual-network
Thank you for reviewing.
Aline Dutra
Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.
The text was updated successfully, but these errors were encountered: