Courseiva
Deploy and Manage Azure ComputeeasyMultiple ChoiceObjective-mapped

AZ-104 Deploy and Manage Azure Compute Practice Question

A Windows VM must install an agent and copy a configuration file automatically after provisioning. The administrator wants Azure to run the setup step without logging into the VM manually. Which feature should be used?

⚠ Common exam trap

Test-takers frequently confuse Boot diagnostics (which is for troubleshooting) with a feature that can run scripts, or assume that Managed disk encryption or Availability sets can perform automated setup tasks, when only VM extensions are designed for post-deployment configuration and software installation.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

VM extension

VM extensions are the correct Azure feature to automatically install agents and apply configurations during or after provisioning without manual login. The Custom Script Extension (CSE) specifically can execute a PowerShell or Bash script to install the agent and copy the configuration file, running as a post-deployment task via Azure Resource Manager (ARM) templates, Azure CLI, or PowerShell.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Boot diagnostics

    Why it's wrong here

    Boot diagnostics captures serial console output and platform-level screenshots of a VM's boot process, storing them in a user-managed storage account for troubleshooting. It works by reading telemetry from the VM's host, and it cannot write to the guest OS, execute custom scripts, or alter startup behavior, so it is irrelevant to installing an agent or copying a configuration file.

    When this WOULD be correct

    A question asks: 'A newly provisioned VM fails to boot. Which feature can be used to view the last screenshot before failure?' Boot diagnostics would be the correct answer.

  • VM extension

    Why this is correct

    VM extensions are designed to perform post-deployment configuration tasks on Azure VMs. A custom script extension can install software, run commands, and place files on the machine without requiring the administrator to sign in manually. This makes it a practical choice for first-boot setup, configuration hardening, and lightweight automation tasks.

  • Managed disk encryption

    Why it's wrong here

    Azure Disk Encryption (ADE) uses BitLocker and Azure Key Vault to encrypt OS and data disks, protecting data confidentiality at rest. It never invokes the guest agent, runs a script, or interacts with the file system as an installation action — it is a passive cryptographic safeguard that operates on storage volumes, not a mechanism to deploy an agent or copy configuration artifacts.

    When this WOULD be correct

    A question asks: 'You need to ensure that all managed disks attached to VMs are encrypted at rest using Azure-managed keys. Which feature should you use?' In that case, managed disk encryption is the correct answer.

  • Availability set

    Why it's wrong here

    An availability set is a logical grouping of VMs that Azure distributes across fault domains and update domains to guarantee a higher service-level agreement. It influences only physical placement and maintenance sequencing, providing no code execution, no guest agent interaction, and no channel to install software or copy files onto the VM.

    When this WOULD be correct

    A question asks: 'You need to ensure that at least two VMs in a web tier remain available during a planned update. Which feature should you use?' In that scenario, an availability set would be correct.

Option-by-option analysis

Why each answer is right or wrong

Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The AZ-104 exam frequently reuses these exact scenarios with slightly different constraints.

VM extensionCorrect answer

Why this is correct

VM extensions are designed to perform post-deployment configuration tasks on Azure VMs. A custom script extension can install software, run commands, and place files on the machine without requiring the administrator to sign in manually. This makes it a practical choice for first-boot setup, configuration hardening, and lightweight automation tasks.

Boot diagnosticsWrong answer — click to see why

Why this is wrong here

Boot diagnostics captures serial console output and screenshots for troubleshooting boot failures, but it does not install agents or copy configuration files automatically after provisioning.

★ When this WOULD be the correct answer

A question asks: 'A newly provisioned VM fails to boot. Which feature can be used to view the last screenshot before failure?' Boot diagnostics would be the correct answer.

Why candidates choose this

Candidates may confuse boot diagnostics with post-deployment configuration tasks, thinking it can execute scripts or install software during boot.

Managed disk encryptionWrong answer — click to see why

Why this is wrong here

Managed disk encryption secures data at rest using Azure Disk Encryption or server-side encryption, but it does not install agents or copy configuration files during VM provisioning.

★ When this WOULD be the correct answer

A question asks: 'You need to ensure that all managed disks attached to VMs are encrypted at rest using Azure-managed keys. Which feature should you use?' In that case, managed disk encryption is the correct answer.

Why candidates choose this

Candidates may confuse encryption with configuration management, thinking that encryption involves an agent or setup script, or they may misread the question as focusing on security rather than automated provisioning.

Availability setWrong answer — click to see why

Why this is wrong here

An availability set is a logical grouping of VMs to provide high availability during planned or unplanned maintenance, not for running setup steps or installing agents after provisioning.

★ When this WOULD be the correct answer

A question asks: 'You need to ensure that at least two VMs in a web tier remain available during a planned update. Which feature should you use?' In that scenario, an availability set would be correct.

Why candidates choose this

Candidates may confuse availability sets with features that automate post-deployment tasks, or they might think that grouping VMs in an availability set triggers some automatic configuration.

Analysis generated from the official AZ-104blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”

About these practice questions

One of 1,049 original AZ-104 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This AZ-104 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-104 exam.