Share via

OneDrive in a VM with multiple users

49asvk 20 Reputation points
2026-03-28T19:55:08.7233333+00:00

Hello I recently faced the issue with storage space running out in my organisation's VM. So went into solution finding and had this thought.

So basically my organisation has a VM for our vertical, and everyone in the group can use it to perform some tasks overnight and then move the files by simple copy & paste in and out of the VM. But the storage space is limited, so I wanted to know if we can install OneDrive for all users in the VM and then they can log in to their individual accounts that way the content is also secure and only I can access my files, and also it'll be easier to move files back and forth.

Please let me know if this is possible! Thank you!!

Windows for business | Windows 365 Business
0 comments No comments

Answer accepted by question author

VPHAN 32,870 Reputation points Independent Advisor
2026-03-28T20:28:30.33+00:00

Hi 49asvk,

Installing OneDrive on a shared VM is a highly practical solution for your team, provided your IT administrator sets it up specifically for a multi-user environment. Standard OneDrive installations place the software binaries inside every individual user profile at C:\Users%username%\AppData\Local\Microsoft\OneDrive, which will rapidly consume your limited drive space as more people log in. Instead, your administrator needs to run the installer using the command line switch OneDriveSetup.exe /allusers. This per-machine installation places the core application just once in C:\Program Files\Microsoft OneDrive, allowing everyone to share a single software footprint while keeping their individual cloud storage securely isolated under their own Microsoft credentials.

To guarantee that individual accounts do not drain the VM storage upon logging in, your administrator must strictly enforce the OneDrive Files On-Demand feature. This is reliably accomplished by creating a system registry key at HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\OneDrive and setting a DWORD value named FilesOnDemandEnabled to 1. This configuration forces the system to display cloud files as zero-byte visual placeholders, meaning Windows will only download the specific files a user actively opens to complete their overnight processing tasks.

To handle the cleanup of those downloaded files after the tasks are finished, your team should utilize Windows Storage Sense. By configuring Storage Sense settings, Windows will monitor the local drive and automatically convert locally cached OneDrive files back into online-only placeholders after a set number of days without access. Combining the per-machine installation with mandatory Files On-Demand and automated Storage Sense dehydration will give your team secure, seamless file transfers while rigorously defending the virtual machine's limited drive capacity.

Hope this answer brought you some useful information. If it did, please hit “accept answer”. Should you have any questions, feel free to leave a comment.

VP

Was this answer helpful?


1 additional answer

Sort by: Most helpful
  1. AI answer

    2026-03-28T19:55:23.48+00:00

    Yes, it’s possible in principle, but it won’t by itself solve storage limits on the VM, and there are some important considerations.

    Key points based on the available information:

    1. OneDrive is per-user and keeps files private
      • OneDrive for work or school is designed so that “all files that you store in OneDrive are private unless you decide to share them.” Each user can sign in with their own work/school account and keep their files separate and secure.
      • This matches the requirement that only the individual can access their own files.
    2. OneDrive is intended as primary storage, not just a copy of local files
      • OneDrive in Microsoft 365 provides at least 1 TB of cloud storage per user, depending on the plan.
      • Best practice is to store work files directly in OneDrive (or SharePoint) and share them as needed, instead of relying heavily on local VM disk.
    3. Files On-Demand can reduce local disk usage
      • OneDrive Files On-Demand lets users see and work with their OneDrive files in File Explorer without downloading everything to the VM.
      • Users can:
        • Keep files “online-only” (cloud icon) so they don’t consume VM disk.
        • Mark only needed files as Always keep on this device.
        • Use Free up space to remove local copies and reclaim VM disk while keeping files in OneDrive.
      • This is the main supported way to help with low disk space while still using OneDrive on a shared or constrained device.
    4. OneDrive does not replace user profile storage
      • In Windows 365/Frontline scenarios, user storage (the C:\Users\%username% profile) is still used for settings, app data, and some files.
      • Guidance for low or full user storage includes freeing up space in OneDrive using Files On-Demand and using tools like Storage Sense to clean up local data.
      • So even if each user signs into OneDrive on the VM, the VM’s disk can still fill up if users sync large amounts of content locally instead of keeping it online-only.
    5. Multi-user / shared VM considerations
      • On a shared VM, each user can sign into the OneDrive client with their own account and maintain their own OneDrive folder and sync settings.
      • To keep the VM usable, users should:
        • Avoid syncing very large libraries locally.
        • Use Files On-Demand and Free up space regularly.
        • Treat the VM as a processing environment and OneDrive as the main storage location.
    6. Managing storage when it’s low or full
      • When storage becomes low or full, recommended actions include:
        • Free up space in OneDrive using Files On-Demand (convert local files back to online-only).
        • Clean up Downloads and other local folders.
        • Run Storage Sense to remove temporary and unneeded local data.

    Summary:

    • Yes, each user can use OneDrive with their own account on a shared VM, and their files remain private unless shared.
    • To actually help with the VM’s limited storage, users must rely on OneDrive Files On-Demand and keep most content online-only, using the VM mainly for temporary processing.
    • Without that discipline, simply adding OneDrive for everyone can increase local disk usage rather than reduce it.

    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.