Install Arc agents using a script

In this article, you learn how to install Arc agents on Azure-enabled SCVMM VMs using a script.


Ensure the following before you install Arc agents using a script for SCVMM VMs:

  • The resource bridge must be in a running state.
  • The SCVMM management server must be in a connected state.
  • The user account must have permissions listed in Azure Arc SCVMM Administrator role.
  • The target machine:
    • Is powered on and the resource bridge has network connectivity to the host running the VM.
    • Is running a supported operating system.
    • Is able to connect through the firewall to communicate over the Internet and these URLs aren't blocked.
    • Has Azure CLI installed.
    • Has the Arc agent installation script downloaded from here for a Windows VM or from here for a Linux VM.


  • If you're using a Linux VM, the account must not prompt for login on sudo commands. To override the prompt, from a terminal, run sudo visudo, and add <username> ALL=(ALL) NOPASSWD:ALL at the end of the file. Ensure you replace <username>.
  • If your VM template has these changes incorporated, you won't need to do this for the VM created from that template.

Steps to install Arc agents using a script

  1. Sign in to the target VM as an administrator.

  2. Run the Azure CLI with the az command from either Windows Command Prompt or PowerShell.

  3. Sign in to your Azure account in Azure CLI using az login --use-device-code

  4. Run the downloaded script arcscvmm-enable-guest-management.ps1 or, as applicable, using the following commands. The vmmServerId parameter should denote your VMM Server’s ARM ID.

    For a Windows VM:

    ./arcscvmm-enable-guest-management.ps1 -<vmmServerId> '/subscriptions/<subscriptionId>/resourceGroups/<rgName>/providers/Microsoft.ScVmm/vmmServers/<vmmServerName>

    For a Linux VM:

    ./ -<vmmServerId> '/subscriptions/<subscriptionId>/resourceGroups/<rgName>/providers/Microsoft.ScVmm/vmmServers/<vmmServerName>

Next steps

Manage VM extensions to use Azure management services for your SCVMM VMs.