Does anyone know how to stop redirecting known folders (desktops, documents, images etc.) via scripts? Or this option is only available manually?
It's controlled via GPOs, see for example here: https://docs.microsoft.com/en-us/onedrive/use-group-policy#prevent-users-from-moving-their-windows-k...
Or the actual feature documentation: https://docs.microsoft.com/en-us/onedrive/redirect-known-folders
@Vasil Michev no, these GPOs could help me to prevent users from moving Desktop, Pictures etc. I need to unlink these folders ftrom OneDrive.