- 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.
推薦閱讀
- 云計(jì)算導(dǎo)論:概念 架構(gòu)與應(yīng)用
- CSS + DIV網(wǎng)頁樣式布局實(shí)戰(zhàn)從入門到精通
- ASP.NET Core 3 框架揭秘(上下冊)
- 地理信息系統(tǒng)中的不確定性問題
- 深度實(shí)踐微服務(wù)測試
- 信息系統(tǒng)項(xiàng)目管理
- pfSense 2.x Cookbook
- Adobe XD界面設(shè)計(jì)與原型制作教程(全彩)
- 網(wǎng)絡(luò)基礎(chǔ)
- Kubeflow:云計(jì)算和機(jī)器學(xué)習(xí)的橋梁
- DIV+CSS網(wǎng)頁布局實(shí)用教程
- 網(wǎng)站組建、管理與維護(hù)
- 現(xiàn)代網(wǎng)絡(luò)新技術(shù)概論(精裝版)
- 新手易學(xué):黑客攻防入門
- 多云和混合云:云原生多集群和應(yīng)用管理