How to Ensure NGINX Is Available on VMSS VMs from an ARM Template?
You plan to deploy several Azure virtual machines that will run Windows Server 2022 in a virtual machine scale set by using an Azure Resource Manager template. You need to ensure that NGINX is available on all the virtual machines after they are deployed. What should you use?
Community Votes
100% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
This question tests your ability to choose the right Azure VM extension for post-deployment software installation on a scale set, and the trap is confusing a DSC publish cmdlet with an extension that actually executes configuration on the VMs.
Deploying NGINX onto every instance of a Windows Server 2022 virtual machine scale set requires a post-deployment script that runs inside each VM, not an App Service or identity feature. The Azure Custom Script Extension is the ARM template resource that satisfies this requirement, so option A is the answer.
Many candidates choose D because Publish-AzVMDscConfiguration sounds like it configures the VMs, but that cmdlet only packages and uploads a DSC configuration to Azure Storage and does not apply it to the scale set instances.
Community Discussion (6 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Why the Answer Is Correct
The Azure Custom Script Extension is designed to run a script after a VM or scale set instance is deployed, which is exactly what is needed to install NGINX on every Windows Server 2022 VM. In an ARM template, you add the extension as a child resource of the virtual machine scale set, and it downloads and executes the script on each instance automatically. This makes it the correct and intended mechanism when the requirement is post-deployment configuration or software installation across all VMs. The extension supports Windows Server images and can run PowerShell or command-line scripts that install packages or configure services such as NGINX.Why the Other Options Are Wrong
Deployment Center in Azure App Service (B) is a continuous deployment feature for web apps hosted in App Service, not a way to install software on virtual machine scale set instances. Microsoft Entra Application Proxy (C) publishes internal web applications for remote access and has nothing to do with installing NGINX or configuring VMs. The Publish-AzVMDscConfiguration cmdlet (D) only uploads a DSC configuration package to Azure Storage; it does not apply that configuration to the deployed VMs or scale set, so it fails the requirement to ensure NGINX is available after deployment. Although a Desired State Configuration extension could be an alternative in some question variants, that option is not presented here, leaving the Custom Script Extension as the only valid choice.Community Comment Notes
jacobc3939 noted that this question has two versions and that the answer will either be the Custom Script Extension or the Desired State Configuration extension. ELearn selected A and added that another acceptable answer is the "desired state configuration extension". 8ac3742 clarified that Publish-AzVMDscConfiguration is used only to publish a DSC script to Azure Automation, while Set-AzVMDscConfiguration is what actually runs it. WALL47 pointed to Microsoft documentation stating "Use this extension for post-deployment configuration, software installation" when recommending the Custom Script Extension.Official Reference
Exam Strategy
When you see a requirement to install or configure software on VMs or scale set instances after deployment, look for a VM extension such as Custom Script Extension or DSC Extension rather than management, identity, or App Service features. Read the verbs carefully: "publish" a DSC configuration is not the same as applying it, so eliminate options that only stage configuration files.
Frequently Asked Questions
Why is Publish-AzVMDscConfiguration wrong for installing NGINX here?
It only uploads a DSC configuration to Azure Storage and does not apply it to the VMSS instances. You need an extension that actually executes configuration on each VM.
Can the Desired State Configuration extension also install NGINX on VMSS?
Yes, the DSC extension is a valid alternative, but the question only offers the publish cmdlet, not the extension itself. The Custom Script Extension remains the best listed answer.
Related Analysis
Practice All AZ-104 Questions
Access 100 questions with complete answers and detailed explanations.
View Full AZ-104 Practice Test →