We are have planning to migrate our Files to Onedrive4B and as part of the requirements we have been asked to Redirect Known Folders to Onedrive in our case (Desktop, Pictures and Documents). Our Documents is redirected to H: Mapped Network Drive so whatever is saved in Documents is synced via the Microsoft Sync Center back to H: Network Location whenever the client is in online mode.
Our Onedrive Group Policies look like this
The Challenge here is since our Documents Folder (which is part of the known folders) is not on the local Machine but in a network location how do we handle this?. We noticed that it was not possible to backup the Documents folder, OneDrive will refuse telling me that "The Documents folder contains other important folders and isn't supported for file protection." Contact your IT Department or something. Similar Description here https://onedrive.uservoice.com/forums/913534-onedrive-security-policy-administration/suggestions/35072257-allow-onedrive-kfm-to-work-with-folder-redirected
This is how the Folders look like when trying to backup Onedrive for Business
So in order to give Onedrive access to my Documents on the local System the plan was to disable Folder Redirection using GPO.
So I did this in a separate group policy which precedes the group policy with all Onedrive settings. https://4sysops.com/archives/how-to-disable-folder-redirection/
I still didn't see a behaviour change or option deactivated even though corresponding registry key is updated on computers after a policy update. I checked the following location https://www.winhelponline.com/blog/windows-10-shell-folders-paths-defaults-restore/
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
Shell Folder Name — Value type: REG_EXPAND_SZ: Personal Location: %USERPROFILE%\Documents
I found an interesting article here https://lazyadmin.nl/office-365/migrate-users-home-drives-to-onedrive-for-business-with-powershell/ that seem to be talking on the same lines but i am not too sure if this is the way to go.
Some recommendations could help
We have been leveraging folder redirection/offline files. Where our folder redirection is configured as "Document" Folder which is targeted towards a CIFS/SMB Share hosted on an on-prem file server (accessible only via Corporate Network or VPN).
In order mitigate issues with “offline” documents folder, it is persistently marked for “offline availability”, thus ensuring the documents folder is also accessible in case client disconnects from the corporate network by leveraging Windows integrated offline files functionality. Windows will automatically switch on offline for the documents folder (in case “documents” is redirected to a remote share)
This created the following challenges:
Changing/removing the folder redirection path will most-likely lead to change of offline target as well, thus potentially causing “re-sync” with invalidation of the local cached copies (potential data loss for data ONLY residing in the local offline cache)
Changing the folder redirection alongside with the associated offline folder target usually is ONLY applied in case of having connectivity to a DC and the associated network share(s) BEFORE the user logs in (applicable to remote users)
Our goal was to move home folder data from the current CIFS/SMB share to OneDrive, which unfortunately will also move the folder redirected “Documents” directory, as it resides on the home drive.
Below is our approach in a nutshell
locally stored on the client again). We achieved this by using respective GPOs and registry settings targeted to remote clients. After which we disabled the H:\ drive mappings in AD using a script.