‹ All AZ-104 questions

AZ-104 Practice Question 57: Custom Script Extension Deploy

Microsoft Azure Administrator Associate (AZ-104) · Test 6 · question 7 of 10

Computeeasy

An ARM template deploys ten Windows Server VMs. As part of the same deployment, a PowerShell script stored in a blob container must run on every VM to install and configure IIS, and nobody should have to sign in to the VMs afterwards.

What should be added to the template?

Select one answer
Show answer and explanation

Answer:

  • B. A Custom Script Extension resource on each VM that points to the script

The Custom Script Extension downloads a script from a location such as Azure Storage and runs it on the VM after it is provisioned. Declared as an extension resource in the template, it runs as part of the deployment on every VM, so the configuration is repeatable and no one needs to connect.

Option A can run the script, but as a manual step that operators have to remember and repeat for each VM. It is not part of the deployment, which is what the requirement asks for.

Option C only opens a network path. It does not run anything, and it adds attack surface for a task that needs no inbound connectivity at all.

Option D provides interactive access for a person. Connecting to ten VMs to run a script by hand is exactly the manual work the team wants to avoid, and Bastion does not add anything to the template that runs the script.

Reference: Use the Azure Custom Script Extension with Windows VMs

Practice Test 6 ›

Study guides for AZ-104