VDI Onedrive Windows 10

/ May 28, 2019/ VMware Horizon

Onedrive and VDI. Can we manage Onedrive to make it accessible for VDI users without performance degradation? That was a question from my product owner. For physical desktops users are familiar with Onedrive so the wish was there to make it available within VDI.

By default Onedrive will be installed on user base within the local folder “%localappdata%\Microsoft\OneDrive” On each user login the process onedrivesetup.exe will be launched and consumes a lot of cpu resources for a while. The process installed and copied all the Onedrive files and folders to the local folder in the user profile.
The source file of this process has been placed by default in the sysWow64 folder C:\Windows\SysWOW64\OneDriveSetup.exe

To prevent that the onedrivesetup.exe process will be started at each user login. the following registry key must be deleted in the default profile.

  1. reg load “hku\virtual” “c:\users\Default User\NTUSER.DAT”
  2. reg DELETE “hku\virtual\Software\Microsoft\Windows\CurrentVersion\Run” /v OneDriveSetup /f
  3. reg UNLOAD “hku\virtual”
After deleting the registry key. On each user login the onedrive setup will not be launched until the user manually starts the Onedrive application. After starting the onedrive application the setup will be launched and installs files under the local appdata folder. To prevent the installation and unnecessary moving files to the local appdata there is a option for installing the onedrive client per machine based instead of user based.

Install Onedrive per machine (preview)

to install onedrive per machine while making the parent vm or golden image you must install Onedrive with the following parameter “C:\Windows\SysWOW64\OneDriveSetup.exe /allusers” check after completing the install wizard if the folder “C:\Program Files (x86)\Microsoft OneDrive\19.043 or higher” exist

There is one requirement, you must use the sync client build 19.043.0304.0003 or later.

Prevent auto update Onedrive client

During setup, Onedrive will install a scheduled task and a Windows service, which are used to perform the updates silently without user intervention.
The following scheduled task and windows services can be disabled to prevent auto updates.

  • Service “Onedrive Updater Service”
  • “OneDrive Per-Machine Standalone Update Task”
* Microsoft recommends always to enable those services and scheduled tasks for security patches. this is dysfunctional in a non persistent VDI environment and should be balanced.
Roaming of Onedrive user settings
Roaming of user settings specific for Onedrive is not advised. i have done that before and the result was a nice single sign-on process without user interruption with the painful end result of data loss ( it was not yet production 😉 See my VMware community post for more information on that.
I have spoken a Microsoft consultant to share my experience and the result of that meeting was that there is a registry key to configure “Silent account configuration”
Action Create
PropertiesHive HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\OneDrive
Value name SilentAccountConfig
Value type REG_DWORD
Value data 0x1 (1)
While doing the silent configuration within a VDI desktop with Onedrive installed per machine. The desktop consumes a few percentage of CPU capacity. The following output is a screenshot of a VDI desktop while doing a user login.
The above output is a nice score in compare with the onedrive client configuration at each user login, while using it on user based. Please note that Onedrive has been configured with the option “files on demand” to avoid large sync actions during a login.


I hope that this blog post will help you while doing the configuration of the Onedrive client within a virtual desktop. Without the tools like fslogix or writable volumes, i think this is the best solution.


FAQ OneDrive

Most frequent questions and answers

Only Onedrive with the function “Files on demand” is acceptable for VDI environments

The OneDrive Sync Client is not supported in a VDI nor RDSH environment as per following Microsoft support article. VMware has tested the sync client’s File On-Demand feature along with Horizon 7 Instant Clone Technology using Windows 10 Fall Creators update. The results were found to be acceptable for use with Windows 10-based VDI pools.

Techzone VMware

C:\Windows\SysWOW64\OneDriveSetup.exe /allusers

You must use the sync client build 19.043.0304.0003 or later.

There is a small chance that the Onedrive version you are using is lower then the required version

To following scheduled task and windows services can be disabled to prevent auto updates.

  • Service “Onedrive Updater Service”
  • “OneDrive Per-Machine Standalone Update Task”


  1. Nice post! I think this post will save a lot of people a great amount of time!

  2. Hi.

    I’m having a trouble, when we re-log on our VDI machine OneDrive deletes the files we didn’t used last sesion. Do you know any solution for this? on the internet I saw many people with that issue but not any solution.

    1. Hello Lince,

      It sounds like the same behavior while testing it for my environment
      Make sure that the hidden file under the folder C:\Users\%username%\OneDrive – vmware\.* has been excluded.
      The best thing should be to exclude all files within the folder.
      When you don’t exclude the files under the root folder, a process within Onedrive would think that there is a problem with the user content an deletes all the files.
      Good Luck! and please let me know if this helps.

      Greetz Kevin

  3. Pingback: OneDrive w/non-persistent VDI |VMware Communities | For servers

  4. we do want users to use one-drive. I would like to understand then should we install one-drive per machine and disable auto update service.

    By the way, excellent blog.

    1. Hello, In case you’re planning to use Onedrive in combination with VDI or RDS, it is better to install Onedrive per-machine based. Make note that the feature “On-demand” only works in combination with the giving version of Onedrive or later.

      so grab the installer and run the Onedrivesetup.exe with the additional parameter 😉



  5. I cant install VDI on my Hp laptop . Installation is kept on failing can you help

    1. Hello Nagma,

      how do you mean “I cant install VDI on my Hp laptop” a VDI environment has several core servers in combination with the vCenter. Would you like to run a virtual machine on your laptop? VMware workstation suits the best

Leave a Comment

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>