powershell - How do I create Subnet in existing Vnet -
i using classic portal , have vnet "rgvnet" configured 10.0.0.0/16 subnet :- 10.0.0.0/24 configured.
i want add new subnet in same vnet without using get-azurevnetconfig -exporttofile c:\networkconfig.xml
.
is there other way add subnet in classic portal add in rm vnet?
appreciate assistance. :)
you not need exporttofile create subnet in vnet:
new-azurermvirtualnetwork -resourcegroupname testrg -name rgvnet` -addressprefix 10.0.0.0/16 -location centralus $vnet = get-azurermvirtualnetwork -resourcegroupname testrg -name testvnet add-azurermvirtualnetworksubnetconfig -name frontend ` -virtualnetwork $vnet -addressprefix 10.0.0.0/24 add-azurermvirtualnetworksubnetconfig -name backend ` -virtualnetwork $vnet -addressprefix 10.0.1.0/24 set-azurermvirtualnetwork -virtualnetwork $vnet
the last step applies configuration.
Comments
Post a Comment