AZ-303 Exam QuestionsBrowse all questions from this exam

AZ-303 Exam - Question 216


SIMULATION -

Click to expand each objective. To connect to the Azure portal, type https://portal.azure.com in the browser address bar.

Exam AZ-303 Question 216Exam AZ-303 Question 216Exam AZ-303 Question 216Exam AZ-303 Question 216Exam AZ-303 Question 216Exam AZ-303 Question 216

When you are finished performing all the tasks, click the `˜Next' button.

Note that you cannot return to the lab once you click the `˜Next' button. Scoring occur in the background while you complete the rest of the exam.

Overview -

The following section of the exam is a lab. In this section, you will perform a set of tasks in a live environment. While most functionality will be available to you as it would be in a live environment, some functionality (e.g., copy and paste, ability to navigate to external websites) will not be possible by design.

Scoring is based on the outcome of performing the tasks stated in the lab. In other words, it doesn't matter how you accomplish the task, if you successfully perform it, you will earn credit for that task.

Labs are not timed separately, and this exam may have more than one lab that you must complete. You can use as much time as you would like to complete each lab. But, you should manage your time appropriately to ensure that you are able to complete the lab(s) and all other sections of the exam in the time provided.

Please note that once you submit your work by clicking the Next button within a lab, you will NOT be able to return to the lab.

To start the lab -

You may start the lab by clicking the Next button.

You plan to deploy several Azure virtual machines and to connect them to a virtual network named VNET1007.

You need to ensure that future virtual machines on VNET1007 can register their name in an internal DNS zone named corp8548984.com. The zone must NOT be hosted on a virtual machine.

What should you do from Azure Cloud Shell?

To complete this task, start Azure Cloud Shell and select PowerShell (Linux), Click Show Advanced Settings, and then enter corpdata7523690n1 in the

Storage account text box and File1 share text box. Click Create storage, and then complete the task.

Show Answer
Correct Answer:

See solution below.

Step 1: Launch Cloud Shell from the top navigation of the Azure portal.

Exam AZ-303 Question 216

Step 2: Select PowerShell -

Exam AZ-303 Question 216

When you start the Azure Cloud Shell for the first time, you will be prompted to create a storage account in order to associate a new Azure File Share to persist files across sessions.

Step 3: Click Show Advanced settings.

Exam AZ-303 Question 216

Step 4: Enter corp8548984n1 in the Storage account text box and File1 share text box. Click Create storage.

Exam AZ-303 Question 216

Step 5: Enter the following command at the powershell command prompt:

New-AzDnsZone -Name "corp8548984.com"

-ResourceGroupName "mycloudshell"

-ZoneType Private

-RegistrationVirtualNetworkId VNET1007

Note: A DNS zone is created by using the New-AzDnsZone cmdlet with a value of Private for the ZoneType parameter.

References:

https://docs.microsoft.com/en-us/azure/dns/private-dns-getstarted-powershell https://docs.microsoft.com/en-us/azure/cloud-shell/quickstart-powershell https://docs.microsoft.com/en-us/powershell/module/az.dns/new-azdnszone?view=azps-1.5.0

Discussion

10 comments
Sign in to comment
gvagav
May 20, 2021

The answer provided uses "New-AzDnsZone" but when I try it I get this message: "New-AzDnsZone: Creation of private DNS zones using this API is no longer allowed. Please use privatednszones resource instead of dnszones resource." If the question is still in the exam, then perhaps it should be the following instead? Create new private DNS zone: New-AzPrivateDnsZone -Name "corp8548984.com" -ResourceGroupName "mycloudshell" Create a link: New-AzPrivateDnsVirtualNetworkLink -ZoneName "corp8548984.com" -ResourceGroupName "mycloudshell" -Name "mylink" -VirtualNetworkId "VNET1007" -EnableRegistration

rdemontis
Jul 19, 2021

Thanks for the tip!

stack120566
Nov 24, 2021

"vnet 1007" will not work you get an error "....Expect fully qualified resource Id that start with '/subscriptions/{subscriptionId}' or '/providers/{resourceProviderNamespace}/'. " Rather than trying to copy and paste. all of virtualnetworkid , just set a variable using $id =(get-azvirtualnetwork -name "vnet1007" ).id Then include the variable New-AzPrivateDnsVirtualNetworkLink -ZoneName "corp8548984.com" -ResourceGroupName "mycloudshell" -Name "mylink" -VirtualNetworkId $id -EnableRegistration

stack120566
Nov 24, 2021

"vnet 1007" will not work you get an error "....Expect fully qualified resource Id that start with '/subscriptions/{subscriptionId}' or '/providers/{resourceProviderNamespace}/'. " Rather than trying to copy and paste. all of virtualnetworkid , just set a variable using $id =(get-azvirtualnetwork -name "vnet1007" ).id Then include the variable New-AzPrivateDnsVirtualNetworkLink -ZoneName "corp8548984.com" -ResourceGroupName "mycloudshell" -Name "mylink" -VirtualNetworkId $id -EnableRegistration

Mikeliz
Jun 7, 2021

New-AzPrivateDnsZone -Name corp8548984.com -ResourceGroupName mycloudshell This will do, you have no business creating or linking vnet to answer the question.

MarcMouelle
Apr 18, 2021

I tested it and it works fine. Install-Module -Name Az.PrivateDns -force $backendSubnet = New-AzVirtualNetworkSubnetConfig -Name backendSubnet -AddressPrefix "10.2.0.0/24" $vnet = New-AzVirtualNetwork ` -ResourceGroupName MyAzureResourceGroup ` -Location eastus ` -Name myAzureVNet ` -AddressPrefix 10.2.0.0/16 ` -Subnet $backendSubnet $zone = New-AzPrivateDnsZone -Name private.contoso.com -ResourceGroupName MyAzureResourceGroup $link = New-AzPrivateDnsVirtualNetworkLink -ZoneName private.contoso.com ` -ResourceGroupName MyAzureResourceGroup -Name "mylink" ` -VirtualNetworkId $vnet.id -EnableRegistration

Stevezzc
Jan 7, 2021

only private dns supports vnet link for record registration. To create a new private dns, refer to https://docs.microsoft.com/en-us/azure/dns/private-dns-getstarted-powershell#create-a-private-dns-zone

Celtic_Bear
Feb 23, 2021

I think this is the solution https://docs.microsoft.com/en-us/azure/dns/private-dns-getstarted-portal

Stephan99
Jan 8, 2021

see also https://docs.microsoft.com/en-us/azure/dns/private-dns-overview

VALEARN
Jan 23, 2021

Just create a private dns zone and set the virtual network link to autoenabled. https://docs.microsoft.com/en-us/azure/dns/private-dns-overview?WT.mc_id=Portal-Microsoft_Azure_PrivateDNS

VALEARN
Jan 23, 2021

Sorry I completely missed using azure cloud shell. Disregard.

Stan007
Feb 20, 2021

correct, tested in lab --create new private DNS zone (will be available within Vnet) New-AzPrivateDnsZone -Name corp8548984.com -ResourceGroupName vnet1005 Also create New-AzPrivateDnsVirtualNetworkLink for each vnet

jallaix
Mar 15, 2021

Also write down that "Get-Command -Noun *PrivateDns*" allows to retrieve these commands.

jallaix
Mar 15, 2021

Also write down that "Get-Command -Noun *PrivateDns*" allows to retrieve these commands.

Ramkid
Apr 5, 2021

As the requirement is to do is from cloudshell, may be this one https://docs.microsoft.com/en-us/azure/dns/private-dns-getstarted-powershell

panschopito
Jul 22, 2021

this must be do with cloudshell (the command are suggested by cli using --help) create a private zone: #az network private-dns zone create --resource-group MyResourceGroup --name www.mysite.com Create a Private DNS zone using a fully qualified domain name. link the private zone to the vnet: #az network private-dns link vnet create --resource-group MyResourceGroup --name MyLinkName --zone-name www.mysite.com --virtual-network MyVirtualNetworkId --registration-enabled False Create a virtual network link to the specified Private DNS zone. out of question, tested on my lab: make a deploy of vm and record type "A" is created in the zone.

panschopito
Jul 22, 2021

this labs is with cloudshell 1.- create a private zone example: az network private-dns link vnet create --name MyLinkName --registration-enabled true --resource-group MyResourceGroup --virtual-network MyVirtualNetworkId --zone-name www.mysite.com 2.- link the private zone to the subnet example: az network private-dns zone create --resource-group MyResourceGroup --name www.mysite.com result: when add a VM to the VNET, a dns record type "A" is created.