Which command should be used in Azure PowerShell to attach a data disk to a VM?

Get more with Examzify Plus

Remove ads, unlock favorites, save progress, and access premium tools across devices.

FavoritesSave progressAd-free
From $9.99Learn more

Get ready for the StudyPlug Exam with interactive quizzes. Utilize hints, detailed explanations, and a wide range of question types. Prepare efficiently and boost your success!

The command used in Azure PowerShell to attach a data disk to a virtual machine is Add-AzVMDataDisk. This command specifically facilitates the process of adding an additional disk to an existing Azure virtual machine.

This command allows you to specify various parameters, such as the virtual machine object, the disk size, whether to create a new disk or attach an existing one, and additional settings pertaining to the disk configuration. The suffix "DataDisk" in the command clearly indicates its purpose related to data disks, making it straightforward for users who need to add storage capacity to their VMs.

The other options do not correctly represent the functionality needed for attaching a data disk. They either use incorrect syntax or terminology that does not align with Azure PowerShell's established commands.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy