- Hands-On Networking with Azure
- Mohamed Waly
- 97字
- 2021-06-24 18:41:28
Creating virtual network peering using PowerShell
First off, you need to retrieve the virtual network information and store it in a variable using the following cmdlet:
$VNet1 = Get-AzureRmVirtualNetwork -ResourceGroupName PacktPub -Name PSVNet
$VNet2 = Get-AzureRmVirtualNetwork -ResourceGroupName PacktPub -Name PSVNet2
Then, you will add the peer from vnet1 to vnet2 by running the following cmdlet:
Add-AzureRmVirtualNetworkPeering -Name PSVNetPeer -VirtualNetwork $vnet1 -RemoteVirtualNetworkId $vnet2.Id
After that, you will add the peer from vnet2 to vnet1 by running the following cmdlet:
Add-AzureRmVirtualNetworkPeering -Name PSVNetPeer -VirtualNetwork $vnet2 -RemoteVirtualNetworkId $vnet1.Id
Now, you are done and have the peer in a connected state.
推薦閱讀
- 網(wǎng)絡(luò)工程設(shè)計(jì)與安裝
- 應(yīng)對(duì)多突發(fā)事件的信息系統(tǒng)應(yīng)用技術(shù)
- .NET Core 2.0 應(yīng)用程序高級(jí)調(diào)試:完全掌握Linux、macOS和Windows跨平臺(tái)調(diào)試技術(shù)
- 安全之美
- 綜合布線設(shè)計(jì)與施工(第2版)
- Solaris 10系統(tǒng)管理
- ASP.NET從入門到精通(第5版)
- 云數(shù)據(jù)中心智能管理
- 信息系統(tǒng)項(xiàng)目管理
- 分析信息:香農(nóng)、維特根斯坦、圖靈和喬姆斯基對(duì)信息的兩次分離
- HIS內(nèi)核設(shè)計(jì)之道:醫(yī)院信息系統(tǒng)規(guī)劃設(shè)計(jì)系統(tǒng)思維
- 網(wǎng)絡(luò)基礎(chǔ)
- 物聯(lián)網(wǎng)及其安全技術(shù)解析
- 釋放數(shù)據(jù)價(jià)值:數(shù)據(jù)資產(chǎn)評(píng)估方法與系統(tǒng)設(shè)計(jì)
- 深度學(xué)習(xí):主流框架和編程實(shí)戰(zhàn)