Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
New-NetFirewallRule -DisplayName "Allow ICMPv4-In" -Protocol ICMPv4
$vnet1Name = 'Pixel1'
$vnet1RG = 'Pixel1'
$vnet2Name = 'Pixel2'
$vnet2RG = 'Pixel2'
$vnet1 = Get-AzureRmVirtualNetwork -Name $vnet1Name -ResourceGroupName $vnet1RG
$vnet2 = Get-AzureRmVirtualNetwork -Name $vnet2Name -ResourceGroupName $vnet2RG
Add-AzureRmVirtualNetworkPeering -Name $vnet1Name'-to-'$vnet2Name -VirtualNetwork $vnet1 -RemoteVirtualNetworkId $vnet2.Id
Add-AzureRmVirtualNetworkPeering -Name $vnet2Name'-to-'$vnet1Name -VirtualNetwork $vnet2 -RemoteVirtualNetworkId $vnet1.Id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.