Question 1 of 25
Your company has an Azure Active Directory (Azure AD) tenant that is configured for hybrid coexistence with the on-premises Active Directory domain. You plan to deploy several new virtual machines (VMs) in Azure. The VMs will have the same operating system and custom software requirements. You configure a reference VM in the on-premise virtual environment. You then generalize the VM to create an image. You need to upload the image to Azure to ensure that it is available for selection when you create the new Azure VMs. Which PowerShell cmdlets should you use?
Show answer
How others answered
- B89%
Explanation
"New-AzVM" is for creating new VMs, not uploading images. "Add-AzImage" does not exist. the correct command is "New-AzImage". "Add-AzImageDataDisk" Adds a data disk to an image object. "Add-AzVhd" seems to be the correct option, sing the it "Uploads a virtual hard disk from an on-premises machine to Azure (managed disk or blob)." (https://docs.microsoft.com/en-us/powershell/module/az.compute/add-azvhd?view=azps-8.3.0)
Adapted from community discussion by NaoVaz · 2024-09-20 · 79 community upvotes. Third-party contribution; reviewed by our quality filter, not independently verified.
Supporting references








