AZ-104 Deploy and Manage Azure Compute Practice Question
This AZ-104 practice question tests your understanding of deploy and manage azure compute. This is a configuration task: choose the command set that satisfies every stated requirement. Small differences — like 'secret' vs 'password' or 'transport input ssh' vs 'all' — change whether the answer is correct. A key principle to apply: the Custom Script Extension runs scripts on Azure VMs.. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
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?
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
A
Azure VM Custom Script Extension
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.
B
A network security group rule allowing RDP from the Internet
Why wrong: Opening RDP only provides interactive access; it does not automate software installation or first-boot scripting.
C
An availability set with two fault domains
Why wrong: Availability sets improve resiliency, but they do not execute provisioning scripts or install software.
D
A managed disk snapshot restored as the operating system disk
Why wrong: A snapshot is for disk recovery, not for running configuration scripts during deployment.
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.
Key principle: The Custom Script Extension runs scripts on Azure VMs.
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.
Related concept
The Custom Script Extension runs scripts on Azure VMs.
✗
A network security group rule allowing RDP from the Internet
Why it's wrong here
Opening RDP only provides interactive access; it does not automate software installation or first-boot scripting.
✗
An availability set with two fault domains
Why it's wrong here
Availability sets improve resiliency, but they do not execute provisioning scripts or install software.
✗
A managed disk snapshot restored as the operating system disk
Why it's wrong here
A snapshot is for disk recovery, not for running configuration scripts during deployment.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that 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.
Detailed technical explanation
How to think about this question
The Custom Script Extension works by downloading a script (PowerShell or Bash) from a specified URI (Azure Blob Storage, GitHub, or a public endpoint) and executing it with elevated privileges. Under the hood, the extension uses the Azure Guest Agent on the VM to manage the download and execution, and it supports retries and status reporting via the Azure portal or CLI. A real-world scenario is deploying a web server where CSE installs IIS or Apache and configures the application settings immediately after the VM is provisioned, ensuring the VM is ready for traffic without manual intervention.
KKey Concepts to Remember
The Custom Script Extension runs scripts on Azure VMs.
It supports PowerShell scripts on Windows and Bash scripts on Linux.
Scripts can be downloaded from Azure Storage or GitHub.
It's ideal for post-deployment configuration and software installation.
TExam Day Tips
→Watch for words such as best, first, most likely and least administrative effort.
→Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
The Custom Script Extension runs scripts on Azure VMs.
Real-world example
How this comes up in practice
A media company stores terabytes of video archives that are accessed once a year for audit purposes. Moving these objects to a cold storage tier (Azure Archive, S3 Glacier, or Google Nearline) costs a fraction of hot storage. Questions like this test whether you understand storage tiers, access frequency tradeoffs, and retrieval latency requirements.
Related glossary terms
Concepts from this question explained
These glossary pages explain the core terms tested in this AZ-104 question in full detail.
Deploy and Manage Azure Compute — This question tests Deploy and Manage Azure Compute — The Custom Script Extension runs scripts on Azure VMs..
What is the correct answer to this question?
The correct answer is: 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.
What should I do if I get this AZ-104 question wrong?
Review the Custom Script Extension runs scripts on Azure VMs., then practise related AZ-104 questions on the same topic to reinforce the concept.
What is the key concept behind this question?
The Custom Script Extension runs scripts on Azure VMs.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
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.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.