How do I move ODfB with known folder redirection?

JRV 546 Reputation points
2021-10-26T15:15:36.733+00:00

ODfB is set up on all PCs, and Folder Redirection Group Policies are in use to redirect all Known Folders except AppData to appropriately-named subfolders (Desktop, Favorites, Saved Games, etc.) of %OneDriveCommercial%.

On 2 machines, we need to move ODfB from C: to D:.

This article [change-the-location-of-your-onedrive-folder-f386fb81-1461-40a7-be2c-712676b2c4ae][1] doesn't seem to address ODfB with KF redirection. Not even the built-in ODfB redirection, much less by GPO.

Windows isn't too keen on having KFs disappear. Desktop in particular; pretty much nothing works when that disappears. I'd assume the folders themselves are locked anyway while a user is logged on.

Also, Group Policy expands environment variables like %OneDriveCommercial% as they're written to the registry. I don't think there's a way to avoid that (GPP can, but not GP). So HKCU...\User Shell Folders and HKCU...\ShellFolders all point to C:, and still will after ODfB moves.

Is this how I need to do it?

  1. Redirect everything for those users back to %USERPROFILE% by GPO.
  2. Move ODfB to D:
  3. Redirect everything back to %OneDriveCommercial% by GPO.

Or is there a shortcut I'm not thinking of?

Windows
Windows
A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.
4,724 questions
OneDrive Management
OneDrive Management
OneDrive: A Microsoft file hosting and synchronization service.Management: The act or process of organizing, handling, directing or controlling something.
1,115 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Viki Ji_MSFT 4,411 Reputation points
    2021-10-27T06:25:42.96+00:00

    Hi @JRV ,
    Welcome to Q&A forum!

    According to my research, if you want to move the OneDrive folder from C: to D:, you may have to sign out of your current account.
    So you may have to redirect the OneDrive folder back to the %USERPROFILE% first.

    Since we do not have a similar test environment currently , I cannot proceed to the next test.
    Thank you for your understanding.

    Besides, If your method cannot achieve this, you might try to enable KFM Group Policy to check.

    Any updates, please let me know.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


  2. Limitless Technology 39,336 Reputation points
    2021-10-29T12:34:16.96+00:00

    Hi @JRV ,

    Thank you for your question and for getting in touch. My name is Samuel and I would be more than happy to help you with your query.

    Well-known folders are global indicators in Windows that represent a location on the user's drive. They help users organize their most important files and access them in different apps.

    See the articles below to understand how to accomplish this:

    https://techcommunity.microsoft.com/t5/microsoft-onedrive-blog/migrate-your-files-to-onedrive-easily-with-known-folder-move/ba-p/207076

    https://learn.microsoft.com/en-us/onedrive/redirect-known-folders

    -------

    --If the answer is helpful, please vote positively and accept as an answer--