Manual Onboarding

Work through the first challenge, onboarding a pair of "on prem" machines into Azure and adding agents.



Should be simple enough as this is a gentle intro.

  1. Use the arc-onprem-servers repo

    Deploy the two VMs. The README has the instructions.

    The terraform output has the password and connectivity info.

  2. Generate the manual scripts

    Go to the Servers - Azure Arc page in the portal.

    Change the tags.


  3. Copy the file (or its contents) to a script on the target servers.

    Linux hints

    • In WSL the Downloads folder is there in /mnt/c/Users/<username>/Downloads.

    • Either edit the file (e.g. code .) or copy

    • scp command format is

      scp /path/to/file <username>@<hostname>:/path/to/file

      The ssh command should give them the user and host part.

    • Example scp command (if stuck)

      scp /mnt/c/Users/richeney/Downloads/
    • Log on using the ssh command in terraform output and run the script as root

      sudo /tmp/

    Windows hints

    • Same flow as for Linux, using Remote Desktop.

    • Go to Server Manager –> Local Server and switch off IEC for Admins. (Seriously, why is IE being shipped as the default browser? Embarrassing.)

    • If you are using the older Remote Desktop Connection you can upload the OnboardingScript.ps1 script up. With the newer universal app, Remote Desktop, then you just use the clipboard to paste into Notepad or PowerShell ISE.

    • The PowerShell script must be run as Administrator.

    • Note that you don’t need to switch off the Windows PowerShell execution policy as the Terraform does that when setting up WinRM. However, here is the command for reference:

    Set-ExecutionPolicy Bypass -Scope Process

Success criteria

  1. The two VMs are in the resource group

  2. The resource provider type is Microsoft.HybridCompute/machines

  3. Base Resource Graph query:

    | where type == "microsoft.hybridcompute/machines"
    | project name,resourceGroup,id
  4. Extra points Resource Graph query:

    | where type == "microsoft.hybridcompute/machines"
    | project name,resourceGroup,properties.osName,id
    | project-rename os=properties_osName

Help us improve

Azure Citadel is a community site built on GitHub, please contribute and send a pull request

Make a change