Wednesday, February 23, 2022

create network interface

$resourceGroup = "exam-grp"

$network = "exam-network"

$subnetName = "SubnetA"

$networkInterfaceName="app-interface"

$virtualNetwork=get-azvirtualnetwork -Name $network -ResourceGroupName $resourceGroup 

$subnet=get-azvirtualnetworksubnetconfig -VirtualNetwork $virtualNetwork -Name $subnetName

New-AzNetworkInterface -Name $networkInterfaceName -ResourceGroupName $resourceGroup -Location $location -SubnetId $subnet.Id -IpConfigurationName "appIpConfig"


No comments:

Post a Comment