exam questions

Exam AZ-100 All Questions

View all questions & answers for the AZ-100 exam

Exam AZ-100 topic 4 question 11 discussion

Actual exam question from Microsoft's AZ-100
Question #: 11
Topic #: 4
[All AZ-100 Questions]

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.
Select and Place:

Show Suggested Answer Hide Answer
Suggested Answer:
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/en-us/powershell/module/azurerm.network/new-azurermvirtualnetwork?view=azurermps-6.7.0

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
tashakori
1 year, 3 months ago
- New-AzureRmApplicationSecurityGroup - New-AzureRmNetworkSecurityRuleConfig - New-AzureRmNetworkSecurityGroup - Add-AzureRmVirtualNetworkSubnetConfig
upvoted 1 times
...
Raj70
2 years, 8 months ago
In the answer just replace the last one (where the VNet is being created) with the New-AzRmApplicationSecurityGroup
upvoted 1 times
...
watermeloner
3 years, 1 month ago
It's wrong answer, my order is 1.Create ASG 2. create Subnet 3.create NSG and associated with Subnet. 4. create security rules.
upvoted 1 times
...
examWalker
4 years, 6 months ago
The answer is wrong since the question mentioned "Application Security Group" which is not NSG. You must use "New-AzureRmApplicationSecurityGroup" to create a ASG Ans also, the virtual network VNET1 has already been created. "Add-AzureRmVirtualNetworkSubnetConfig" can create a subnet and associate to the existing virtual network.
upvoted 3 times
...
certificatores
5 years, 3 months ago
Given Answer is correct. I tried in Azure
upvoted 3 times
...
libra
5 years, 5 months ago
I think the answer is incorrect, VNet1 have been created in subscription. only need add subnet, does not need New-AzureRmVirtualNetwork
upvoted 2 times
libra
5 years, 5 months ago
Sorry, i wrong, New-AzureRmVirtualNetwork is add subnet.
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...