Given the Bash script to create a resource group in Microsoft Azure, identify
the missing line:
#!/bin/bash
az login --username admin@example.com --password examplePassword
# Missing line here
A) az group create --name MyResourceGroup --location eastus
B) create-az-resource-group --name MyResourceGroup
C) az resource new --group MyResourceGroup --location eastus
D) az group set --name MyResourceGroup --location eastus Right Ans - A
Given the Bash script to list all VMs in a specific resource group, what is the
missing line?
#!/bin/bash
az login
# Missing line here
A) az vm list --output table
B) az vm list --resource-group MyResourceGroup --output table
C) list-az-vm --resource-group MyResourceGroup
D) az vm show --resource-group MyResourceGroup Right Ans - B
This script is intended to delete a virtual network. What line completes the
script correctly?
#!/bin/bash
az login --service-principal -u http://azure-cli-2020-04-01 --password
{password} --tenant {tenant}
# Missing line here
A) az network vnet delete --name MyVnet --resource-group
MyResourceGroup
B) az vnet remove --name MyVnet --resource-group MyResourceGroup
,C) delete-az-vnet --name MyVnet --resource-group MyResourceGroup
D) az network vnet destroy --name MyVnet --resource-group
MyResourceGroup Right Ans - A
In this script to update tags for a storage account, which line correctly
completes the script?
#!/bin/bash
az login
# Missing line here
A) az storage account update --name mystorageaccount --resource-group
MyResourceGroup --set tags.CostCenter=Finance
B) update-az-storage --name mystorageaccount --tags CostCenter=Finance
C) az storage update --account-name mystorageaccount --tags
"CostCenter=Finance"
D) az storage account tag --name mystorageaccount --tags
"CostCenter=Finance" Right Ans - A
Complete this script designed to retrieve the usage details of an Azure
subscription. What is the correct line to insert?
#!/bin/bash
az login
# Missing line here
A) az account show --output table
B) az account usage-list
C) az account list-locations
D) az consumption usage list --output table Right Ans - D
Given the PowerShell script to create a virtual network, what is the correct
line to complete the script?
Connect-AzAccount
# Missing line here
A) New-AzVirtualNetwork -Name MyVnet -ResourceGroupName
MyResourceGroup -Location "East US"
,B) Create-AzVNet -VNetName MyVnet -ResourceGroup MyResourceGroup
C) Set-AzVirtualNetwork -VNetName MyVnet -ResourceGroup
MyResourceGroup
D) Add-VirtualNetwork -Name MyVnet -ResourceGroup MyResourceGroup
Right Ans - A
Complete this script for updating a storage account with a new tag. What is
the missing line?
Connect-AzAccount
# Missing line here
A) Update-AzStorageAccount -ResourceGroupName MyResourceGroup -Name
MyStorage -Tag @{ Department="Finance" }
B) Set-AzStorageAccount -ResourceGroupName MyResourceGroup -
AccountName MyStorage -Tags @{ Department="Finance" }
C) Modify-AzStorageAccount -Name MyStorage -Tags
@{ Department="Finance" }
D) Tag-AzStorageAccount -ResourceGroupName MyResourceGroup -Name
MyStorage -NewTags @{ Department="Finance" } Right Ans - B
This script is used to retrieve all VMs within a given subscription. Which line
should be added to complete the script?
Connect-AzAccount
# Missing line here
A) Get-AzVM
B) List-AzVirtualMachine
C) Retrieve-AzVM -All
D) Show-AzVMList Right Ans - A
For a script designed to delete a resource group, identify the correct line to
complete it:
Connect-AzAccount
# Missing line here
A) Remove-AzResourceGroup -Name MyResourceGroup
, B) Delete-AzResourceGroup -ResourceGroupName MyResourceGroup
C) Erase-AzResourceGroup -GroupName MyResourceGroup
D) Clear-AzResourceGroup -ResourceGroupName MyResourceGroup Right
Ans - A
Contoso University needs to set up a new group for their summer research
project that includes students, faculty, and external advisors. The group
should facilitate resource sharing and collaboration. Which type of group
should you create in Microsoft Azure for this purpose?
A) Distribution Group
B) Office 365 Group
C) Security Group
D) Dynamic Distribution Group Right Ans - B
The marketing team at Contoso Ltd., with a domain of contoso.com, requires a
modification where the team manager must approve any changes to group
memberships. Which setting should you configure to enforce this
requirement?
A) Set group membership as "Dynamic Membership"
B) Enable "Owner Approval Required" for group memberships
C) Implement Conditional Access Policies
D) Configure group memberships as "Private" Right Ans - B
Contoso Ltd. needs to assign Microsoft 365 E3 licenses to new users in the
contoso.edu domain automatically upon account creation. Which Azure
solution should you implement to meet this requirement?
A) Manual assignment of licenses
B) Group-based license management
C) Use Azure AD Connect with auto-licensing
D) Implement Enterprise Mobility + Security (EMS) Right Ans - B
To enhance security, Contoso Ltd. wants to ensure that external users from
contoso.org can access resources only during business hours. Which feature
should you use to configure this access limitation?
A) Conditional Access Policies
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller LeCrae. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $29.99. You're not tied to anything after your purchase.