authentichost.blogg.se

Onedrive download folder without sync
Onedrive download folder without sync













onedrive download folder without sync
  1. #Onedrive download folder without sync full#
  2. #Onedrive download folder without sync for windows 10#
  3. #Onedrive download folder without sync Offline#
  4. #Onedrive download folder without sync windows#

Intune PowerShell script settings - user context. Intune allows you to implement PowerShell scripts that run in the user context or Local System contexts. My script could do with some additional error checking and robustness however, it provides the functionality required to redirect specific folders into the OneDrive folder and can be re-run as necessary to enforce redirection for each folder. Implements redirection for the Desktop, Documents and Pictures folders.Reads the OneDrive for Business sync folder from the registry to avoid hard-coding the target path.Redirect-Folder - this function wraps some testing around the redirect + move functionality.

#Onedrive download folder without sync full#

This function ensures that we also get a full log of all files moved to the new path. Rather than implement the same functionality of Robocopy in PowerShell, the script references it directly to move the contents of the folder to the new location.

  • Move-Files - a wrapper for Robocopy.exe.
  • Get-KnownFolderPath - we need to know what the existing physical path is before redirecting the folder.
  • My version updates the Set-KnownFolderPath function to ensure all known folders for Documents, Pictures etc. In its current iteration though, all it does is redirect the folder.īecause we also need to move the folder contents, I’ve forked the script and added some additional functionality: 400: Invalid request This script defines a function called Set-KnownFolderPath that can be used to redirect a folder of your choosing to a target path and it works quite well. Implementing folder redirection in PowerShellĪ script that performs folder redirection using SHSetKnownFolderPath is available from here: SetupFoldersForOneDrive.ps1. Given that we don’t have Group Policy available to us, we need to implement steps 1 and 5 in such a way that we can be sure the redirection and move of data will be successful. Step 1 is our primary requirement and step 5 (moving existing data into the new folder on the same disk), should be quick and reasonably safe on modern PCs with SSDs. In this case, because we’re looking to redirect folders with the source and destination in the user profile on a local disk, we can skip steps 2, 3, and 4.
  • If desired, the files contained within specified folders are moved to the new location, which also deletes them from the source folder if the source folders are local.
  • If the folder exists, access rights and folder ownership are checked.
  • If the target folder does not exist, the folder is created and the appropriate access control list (ACL) rights are set.
  • Determine the target location specified for redirection and confirm the user has access rights to that location.
  • Determine which user folders to redirect based on changes to Group Policy settings at the time of logon.
  • onedrive download folder without sync onedrive download folder without sync

    The article includes the following overview of folder redirection:įolder Redirection processing contains five steps:

    #Onedrive download folder without sync windows#

    The document targets Windows XP and Windows Server 2003, but the concepts are still the same in 2017. Here’s an old, but an excellent article that covers how the Folder Redirection Extension works. Testing, feedback and improvements can be logged on the repository. Going forward any additional development will occur there. A GitHub repository has been established for the scripts in this article. With PowerShell scripts available to deploy via Intune, we can create a custom approach for redirecting essential folders into OneDrive.

    #Onedrive download folder without sync for windows 10#

    Implementing folder redirection for Windows 10 via Intune currently isn’t possible, so we need a creative solution to this challenge. Some organisations will even have implemented folder redirection into the OneDrive folder via Group Policy, as a better alternative.

    #Onedrive download folder without sync Offline#

    Traditionally managed PCs will have folder redirection (and offline files) so that user’s documents are synchronised when connected to the corporate network. If you’re deploying Windows 10 with Modern Management (Azure AD joined, MDM managed), you’ll likely have wondered about data protection - if users aren’t intentionally saving documents to their OneDrive folder, that data is likely, not synchronised and therefore not protected against data loss.















    Onedrive download folder without sync