hardmultiple choiceObjective-mapped

A Windows VM must install IIS after provisioning and then run a script that registers the server with an internal API by using the VM's managed identity. The same steps must run automatically whenever the VM is deployed from Bicep. What should be added to the deployment?

Question 1hardmultiple choice
Full question →

A Windows VM must install IIS after provisioning and then run a script that registers the server with an internal API by using the VM's managed identity. The same steps must run automatically whenever the VM is deployed from Bicep. What should be added to the deployment?

Answer choices

Why each option matters

Good practice is not just finding the correct option. The wrong answers often show the exact trap the exam wants you to fall into.

A

Distractor review

A read-only resource lock on the VM resource group

A lock prevents changes, but it does not install software or run deployment scripts.

B

Best answer

A Custom Script Extension on the VM

The Custom Script Extension runs scripted configuration during deployment and is suitable for post-provisioning setup.

C

Distractor review

An availability set containing the VM

Availability sets improve resiliency, but they do not automate operating-system configuration.

D

Distractor review

A proximity placement group for the VM

Proximity placement groups influence placement and latency, not software installation.

Common exam trap

Common exam trap: answer the scenario, not the keyword

Many certification questions include familiar terms but test a specific constraint. Read the exact wording before choosing an answer that is generally true but wrong for this case.

Technical deep dive

How to think about this question

This question should be treated as a scenario, not a definition check. Identify the problem, the constraint and the best action. Then compare each option against those facts.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.
  • Use explanations to understand the rule behind the answer.

TExam Day Tips

  • Underline the problem statement mentally.
  • 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.

Related practice questions

Related AZ-104 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

More questions from this exam

Keep practising from the same exam bank, or move into a focused topic page if this question exposed a weak area.

FAQ

Questions learners often ask

What does this AZ-104 question test?

Read the scenario before looking for a memorised answer.

What is the correct answer to this question?

The correct answer is: A Custom Script Extension on the VM — The Custom Script Extension is the right tool because it lets Azure run configuration commands after the VM is provisioned, which is exactly what is needed to install IIS and launch the registration script. When combined with a managed identity on the VM, the script can authenticate to Azure or internal services without embedded credentials. In Bicep, this can be fully automated and repeated on every deployment. Why others are wrong: A resource lock blocks management operations but does not perform configuration. An availability set only addresses resilience, not software setup. A proximity placement group may reduce latency between resources, but it has no role in post-deployment scripting or managed-identity-based registration logic.

What should I do if I get this AZ-104 question wrong?

Then try more questions from the same exam bank and focus on understanding why the wrong options are tempting.

Discussion

Loading comments…

Sign in to join the discussion.