181k views
4 votes
Which PowerShell cmdlet is used to capture a VM, and which Azure CLI command is used to capture an image?

a. Capture-VM and az vm capture
b. Save-VMImage and az image create
c. Export-VM and az vm export
d. Snapshot-VM and az snapshot create

User Biggie Mac
by
9.0k points

1 Answer

1 vote

Final answer:

The PowerShell cmdlet closest to the one mentioned for capturing a VM is Capture-AzVM, but none of the options are accurate. The Azure CLI command to capture an image is az vm capture, with az image create being the command to create a new image.

Step-by-step explanation:

In Microsoft Azure, the PowerShell cmdlet used to capture a VM is Capture-AzVM. However, the option closest to this command listed in the options is Capture-VM, which follows the pattern but is not the exact cmdlet name for Azure. The correct Azure CLI command to capture an image is az vm capture. As for creating an image in Azure using Azure CLI, the command is az image create. The options provided seem to mix the terminology for VM capture and image creation. Therefore, strictly speaking, none of the given options accurately represent the precise commands used. However, considering the context and the essence of the question, option 'a' has a command that is closest to the actual commands used in Azure, albeit not exactly accurate.

User Shaifali Rajput
by
8.5k points