Administering Windows Server Hybrid Core Infrastructure (AZ-800) 2025 – 400 Free Practice Questions to Pass the Exam

Image Description

Question: 1 / 400

What is the best solution for running a script on an Azure Arc-managed VM at Contoso?

Use a policy to configure the script

Use a CustomScriptExtension VM extension

Using a CustomScriptExtension VM extension is the best solution for running a script on an Azure Arc-managed VM for several reasons. This extension allows you to execute scripts on your VMs quickly and effectively, making it particularly useful for automation and configuration tasks. With the Custom Script Extension, you can add or modify scripts directly on the Azure Arc-managed VM, and it comes with the advantage of being able to pass parameters, execute scripts securely, and manage dependencies.

The Custom Script Extension is designed to download and execute scripts from Azure Storage or GitHub, which helps in maintaining version control and improving deployment efficiency. It also supports both PowerShell and shell scripts, making it versatile for different scripting needs, depending on the operating system of the VM.

While other methods are available, they may not provide the same level of convenience or efficiency. For instance, policies typically work on a broader scope and are not as direct for running individual scripts. Scheduled tasks can be useful but require additional setup, checks, and maintenance to ensure that scripts trigger as expected. Runbooks in Azure Automation are powerful for managing complex workflows and automated tasks but may be more involved than necessary for executing a straightforward script on a specific VM.

Thus, the CustomScriptExtension offers a straightforward, efficient

Get further explanation with Examzify DeepDiveBeta

Create a scheduled task for the script

Use a Runbook in Azure Automation

Next Question

Report this question

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy