I'm attempting to disable OneDrive on some new machines my client has acquired. They are all (about 200 in total) running Windows 10 Pro (unfortunately not enterprise). I'm trying to figure out a way to enable the "Prevent the usage of OneDrive for file storage" policy under "Local Computer Policy\Computer Configuration\Administrative Templates\Windows Components\OneDrive" from the command line. Unfortunately it's a bit time consuming to individually go into gpedit.msc browse through and enable it on each machine.

Any suggestions?

  • So are these 200 computers not on a domain? – Ƭᴇcʜιᴇ007 Mar 29 '16 at 3:45
  • They are spread across two domains. The ideal scenario would have been to simply push the policies down to the selected groups, but the global IT organization (not to be confused with the business unit's IT staff) as a policy doesn't want to help facilitate anything. At this point we are just trying to roll out some new machines (to get XP out of the field). – Eric Mar 30 '16 at 2:55

If these computers are not in a domain for some reason, you can use this command to disable OneDrive.

reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive" /v "DisableFileSyncNGSC" /t REG_DWORD /d 1 /f

This has to be run as administrator. "DisableFileSyncNGSC" corresponds to "Prevent the usage of OneDrive for file storage" GPO.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.