,

How to Automatically Start OneDrive Sync in Azure Virtual Desktop RemoteApp Scenarios

How to Automatically Start OneDrive Sync in Azure Virtual Desktop RemoteApp Scenarios

If you’re planning to use OneDrive or File Explorer as a RemoteApp in Azure Virtual Desktop (AVD), there’s a key detail you shouldn’t miss: OneDrive sync won’t start automatically unless you explicitly configure it. This post explains the issue and how to solve it.

🧠 The Problem

By default, AVD RemoteApps don’t start background processes like OneDrive.exe. That means:

  • User opens the RemoteApp (e.g., File Explorer 🗂️)
  • The Explorer shell isn’t fully initialized 🧠
  • The OneDrive folder shows up 📁
  • But files don’t sync ❌ unless the user manually starts OneDrive

That’s not great for user experience or data integrity.

✅ The Solution

You need to make sure the OneDrive sync engine starts when a user logs in – even if they’re just using a RemoteApp.

📥 Step 1: Import the Missing ADMX Template

To enable enhanced shell experience for RemoteApps, you need access to a special ADMX template that is not included in the standard Microsoft ADMX downloads.

🔧 Copy these two files from a session host:

  • C:\Windows\PolicyDefinitions\terminalserver.admx
  • C:\Windows\PolicyDefinitions\en-US\terminalserver.adml

💡 These files only exist on actual AVD session hosts. They’re not in the downloadable ADMX package from Microsoft.

🏛️ Step 2: Add the Template to Your Policy Source

Now that you have the template, you can:

  • Copy it into your Central Group Policy Store,
    or
  • Import it into Intune as an Imported Administrative Template.

🖥️ Step 3: Enable the Policy Setting

Open Group Policy Management Editor and go to:

Computer Configuration >
Policies >
Administrative Templates >
Windows Components >
Remote Desktop Services >
Remote Desktop Session Host >
Remote Session Environment

Find the policy:

Enable enhanced shell experience for RemoteApp

Double-click it, set it to Enabled, and confirm with OK.

This allows RemoteApp sessions to initialize a more complete shell environment — needed for OneDrive to work properly.


🪄 Step 4: Ensure OneDrive Starts Automatically

Unfortunately, enabling the policy alone is not enough.
You must also explicitly configure OneDrive to start in the background when a session begins.

🔑 Set the following registry value:

KeyHKLM\Software\Microsoft\Windows\CurrentVersion\Run
NameOneDrive
TypeREG_SZ
Data"C:\Program Files\Microsoft OneDrive\OneDrive.exe" /background

This ensures OneDrive is launched automatically for every user session, even when using RemoteApps.

💻 Or use PowerShell:

New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" -Name OneDrive -PropertyType String -Value '"C:\Program Files\Microsoft OneDrive\OneDrive.exe" /background' -Force

✅ How to Test OneDrive Sync in a RemoteApp Scenario

Once everything is configured, here’s how you can test that OneDrive works correctly with RemoteApps:

  1. 🔗 Connect to your published RemoteApp using the Windows App.
  2. 👁️ Look for the OneDrive icon in your local taskbar.
    • Hover over it — the tooltip should say “Remote” to confirm it’s running inside the AVD session.
  3. 🔄 Check sync status via the OneDrive Action Center.
    • Sign in if prompted.
    • Make sure files are syncing as expected.
  4. 📂 Access OneDrive files from inside the RemoteApp (e.g., File Explorer).
  5. ❌ Close the RemoteApp (and any others from the same session). Within a few minutes, OneDrive should automatically exit.

🧪 If all that works: your setup is good to go!

💡 Why It Matters

Without this config, users think their files are syncing—but they’re not.
This leads to:

  • ❗ Data loss
  • ❓ Confusion
  • 🧯 Support tickets

Setting this up correctly ensures:

  • 💼 Reliable sync
  • 🧘 Zero user interaction
  • 🛠️ A clean RemoteApp experience

2 responses to “How to Automatically Start OneDrive Sync in Azure Virtual Desktop RemoteApp Scenarios”

  1. Prasant k Avatar
    Prasant k

    thx, do we have something for Citrix vdi as well ??

    1. Daniel Fraubaum Avatar

      Sorry, I can’t answer this question directly because I’m no Citrix guy … But I think there is an similar feature!

Leave a Reply

Your email address will not be published. Required fields are marked *