AZ-104 Deploy and Manage Azure Compute Practice Question
Exhibit
Provisioning requirement: - A Windows VM is created from a marketplace image - IIS must be installed automatically on first boot - Application files must be copied from Azure Blob Storage - A bootstrap script named bootstrap.ps1 must run after the VM starts - No manual RDP steps are allowed
Based on the exhibit, which Azure feature should the administrator use to install software and run the bootstrap script during VM provisioning?
⚠ Common exam trap
Candidates often confuse network security group rules (which control traffic) or availability sets (which provide redundancy) with the ability to run scripts, but only the Custom Script Extension can execute code during VM provisioning.
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
✓
Azure VM Custom Script Extension
The Azure VM Custom Script Extension (CSE) is the correct feature because it allows the administrator to execute scripts (such as installing software or running a bootstrap script) during VM provisioning or after the VM is running. The extension downloads the script from Azure Storage or a public URL and executes it using the local system account, making it ideal for post-deployment configuration tasks.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Azure VM Custom Script Extension
Why this is correct
The Custom Script Extension is designed to run scripts after deployment and is commonly used for first-boot configuration. It can download files, execute installation commands, and automate bootstrap tasks without requiring manual sign-in. This matches the requirement to install IIS, copy application files, and run bootstrap.ps1 as part of provisioning.
- ✗
A network security group rule allowing RDP from the Internet
Why it's wrong here
An NSG rule permitting RDP (TCP 3389) from the Internet only controls network-level access; it does not cause any code to run on the VM. Even if a user connects, the required IIS installation, file copy, and bootstrap.ps1 execution would need to be performed manually, and exposing RDP directly to the Internet increases the attack surface. This option changes who can reach the VM, not what the VM does during provisioning.
When this WOULD be correct
This option would be correct for a question asking which Azure feature allows remote desktop connectivity to a VM from the internet after deployment.
- ✗
An availability set with two fault domains
Why it's wrong here
An availability set with two fault domains is a placement construct that separates VMs across different physical hardware to protect against rack-level failures. It has no interaction with the operating system or the VM's startup sequence, so it cannot install IIS, stage application files, or run bootstrap.ps1. Availability sets are relevant for SLA and uptime, whereas the exhibit's requirement is about automatic software configuration during VM creation.
When this WOULD be correct
This option would be correct if the question asked: 'Which Azure feature should be used to ensure that at least one VM remains available during planned maintenance or hardware failure?'
- ✗
A managed disk snapshot restored as the operating system disk
Why it's wrong here
A managed disk snapshot captures a point-in-time copy of an existing OS or data disk. Restoring it as the OS disk would simply recreate the exact disk contents from that snapshot, meaning no new scripts run unless the bootstrapping logic was already baked into the operating system image. This approach requires pre-configuring the source VM beforehand and does not satisfy a fresh deployment scenario where IIS is installed and bootstrap.ps1 runs as part of provisioning.
When this WOULD be correct
A question asking how to quickly deploy multiple VMs with identical pre-installed software and configurations, where the software installation is already completed before snapshot creation, would make this option 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.
✓Azure VM Custom Script ExtensionCorrect answer▾
Why this is correct
The Custom Script Extension is designed to run scripts after deployment and is commonly used for first-boot configuration. It can download files, execute installation commands, and automate bootstrap tasks without requiring manual sign-in. This matches the requirement to install IIS, copy application files, and run bootstrap.ps1 as part of provisioning.
✗A network security group rule allowing RDP from the InternetWrong answer — click to see why▾
Why this is wrong here
A network security group rule allowing RDP from the Internet only controls inbound traffic to the VM, but does not install software or run scripts during provisioning.
★ When this WOULD be the correct answer
This option would be correct for a question asking which Azure feature allows remote desktop connectivity to a VM from the internet after deployment.
Why candidates choose this
Candidates may confuse network access with the ability to perform post-deployment configuration, thinking that allowing RDP enables script execution.
✗An availability set with two fault domainsWrong answer — click to see why▾
Why this is wrong here
An availability set with two fault domains is used to ensure high availability by protecting against hardware failures within a datacenter, not for installing software or running scripts during VM provisioning.
★ When this WOULD be the correct answer
This option would be correct if the question asked: 'Which Azure feature should be used to ensure that at least one VM remains available during planned maintenance or hardware failure?'
Why candidates choose this
Candidates may confuse availability sets with deployment automation, thinking that distributing VMs across fault domains also handles software installation tasks.
✗A managed disk snapshot restored as the operating system diskWrong answer — click to see why▾
Why this is wrong here
Restoring a managed disk snapshot as the OS disk provisions a VM from a pre-configured image, but it does not execute a bootstrap script or install software during provisioning; it only replicates the state at snapshot time.
★ When this WOULD be the correct answer
A question asking how to quickly deploy multiple VMs with identical pre-installed software and configurations, where the software installation is already completed before snapshot creation, would make this option correct.
Why candidates choose this
Candidates may confuse snapshot restoration with a deployment method that includes post-deployment scripting, assuming the snapshot captures the installation process itself rather than just the resulting state.
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?”
Go deeper
Related to this question
Learn chapter
Managed Identities for Azure Resources
Key term
Custom script extension
A virtual machine extension for Azure that downloads and runs scripts on a VM after it is deployed, used for configuration, software installation, and post-deployment tasks.
Key term
Azure Storage
Azure Storage is Microsoft's cloud-based service for storing data like files, messages, and backups with high durability and scalability.
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 →
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.