Skip to Content

AZ-104: Optimizing VM Creation Scripts Boosting Efficiency with –no-wait Argument

Learn how to enhance script efficiency by utilizing the –no-wait argument for VM creation commands, ensuring seamless execution and faster deployment of Azure resources.

Table of Contents

Question

Suppose you have a script that creates several VMs with different images. When the script issues the command to create the first VM you don’t want to block the script while the VM is created, instead you want the script to immediately move on to the next command. What is the best way to do this?

A. Add the ‘–async’ argument to your create command.
B. Use the ampersand (&) to run the process in the background.
C. Add the ‘–no-wait’ argument to your create command.

Answer

C. Add the ‘–no-wait’ argument to your create command.

Explanation

Adding ‘–no-wait’ will cause ‘azure VM create’ to return immediately without waiting for the VM to actually be created.

A is incorrect. There’s no ‘–async’ argument as part of ‘azure VM create’.
B is incorrect. This may do what you intend on some platforms but likely will use more system resources than the supported method.

Microsoft Azure Administrator AZ-104 certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Microsoft Azure Administrator AZ-104 exam and earn Microsoft Azure Administrator AZ-104 certification.