
Answer-first summary for fast verification
Answer: Add-AzVhd, uploads .vhd files to blob storage.
The correct PowerShell cmdlet to upload a generalized VM image to Azure is Add-AzVhd. This cmdlet uploads on-premises virtual hard disks, in .vhd file format, to a blob storage account as fixed virtual hard disks. The other options are incorrect for this purpose: Add-AzVM is for creating new VMs, not for uploading images; Add-AzImage does not exist (the correct command is New-AzImage); Add-AzImageDataDisk adds a data disk to an existing image object, not the entire generalized image. Therefore, the correct choice is B.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
In a hybrid Azure AD environment, which PowerShell cmdlet should be used to upload a generalized VM image to Azure for creating new VMs?
A
Add-AzVM, used for VM creation.
B
Add-AzVhd, uploads .vhd files to blob storage.
C
Add-AzImage, a non-existent cmdlet.
D
Add-AzImageDataDisk, for adding data disks to VM images.