Which four cmdlets should you run in sequence?

DRAG DROP

You have an Azure subscription. The subscription includes a virtual network named VNet1.

Currently, VNet1 does not contain any subnets.

You plan to create subnets on VNet1 and to use application security groups to restrict the traffic between the subnets. You need to create the application security groups and to assign them to the subnets.

Which four cmdlets should you run in sequence? To answer, move the appropriate cmdlets from the list of cmdlets to the answer area and arrange them in the correct order.

Answer:

Explanation:

Step 1: New-AzureRmNetworkSecurityRuleConfig

Step 2: New-AzureRmNetworkSecurityGroup

Step 3: New-AzureRmVirtualNetworkSubnetConfig

Step 4: New-AzureRmVirtualNetwork

Example: Create a virtual network with a subnet referencing a network security group New-AzureRmResourceGroup -Name TestResourceGroup -Location centralus

$rdpRule = New-AzureRmNetworkSecurityRuleConfig -Name rdp-rule -Description "Allow RDP" -Access Allow -Protocol Tcp -Direction Inbound -Priority 100 -SourceAddressPrefix Internet -SourcePortRange * -DestinationAddressPrefix * -DestinationPortRange 3389

$networkSecurityGroup = New-AzureRmNetworkSecurityGroup -ResourceGroupName

TestResourceGroup -Location centralus -Name "NSG-FrontEnd" -SecurityRules $rdpRule

$frontendSubnet = New-AzureRmVirtualNetworkSubnetConfig -Name frontendSubnet -AddressPrefix

"10.0.1.0/24" -NetworkSecurityGroup $networkSecurityGroup

$backendSubnet = New-AzureRmVirtualNetworkSubnetConfig -Name backendSubnet -AddressPrefix "10.0.2.0/24" -NetworkSecurityGroup $networkSecurityGroup New-AzureRmVirtualNetwork -Name MyVirtualNetwork -ResourceGroupName TestResourceGroup -Location centralus -AddressPrefix "10.0.0.0/16" -Subnet $frontendSubnet,$backendSubnet

References: https://docs.microsoft.com/enus/powershell/module/azurerm.network/new-azurermvirtualnetwork?view=azurermps-6.7.0

Latest AZ-104 Dumps Valid Version with 416 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
2 Comments
Inline Feedbacks
View all comments
Ryan
Ryan
2 years ago

My copy/paste failed me. The steps should be:

1. New-AzureRmVirtualNetworkSubnetConfig
2. New-AzureRmNetworkSecurityGroup
3. New-AzureRmNetworkSecurityRuleConfig
4. New-AzureRmApplicationSecurityGroup

Ryan
Ryan
2 years ago

The answer to this seems all messed up. The question states “You plan to create subnets on VNet1 and to use application security groups to restrict the traffic between the subnets. You need to create the application security groups and to assign them to the subnets.”

So it should be:
1. New-AzureRmVirtualNetworkSubnetConfig
2. New-AzureRmNetworkSecurityGroup
3. New-AzureRmNetworkSecurityGroup
4. New-AzureRmNetworkSecurityRuleConfig

Following the question guidelines that should be the order you do things in.

Or am I missing something here?