How to redirect MS OneNote cache in roaming profiles

Since MS OneNote is still around in companies, also used in Citrix environments, it’s important to make sure the OneNote cache folder is being redirected to a location outside the roaming profile. Since it can take up a lot of space, redirection of the cache folder is mandatory. Whether you use MS roaming profiles, Citrix UPM profiles or VMware UEM profiles, you don’t want to have the OneNote cache roaming in your profile.

Natively, Microsoft doesn’t provide a solution to centrally redirect the OneNote cache folder. No Group Policy exists in which you can configure a redirect. Of course you can instruct your users to manually configure this, but that doesn’t make sense in larger environments.

The solution lays in the use of junctions. A simple batch script can create a junction which would redirect the OneNote cache folder to your homedrive. This script can be deployed by any means you have at hand.

Junction for OneNote cache
if exist %localappdata%\microsoft\OneNote rename %localappdata%\microsoft\OneNote OneNote.old
mklink /d %localappdata%\microsoft\OneNote \\%server%\UserFolders\%username%\OneNote
if not exist \\%server%\UserFolders\%username%\OneNote MD \\%server%\UserFolders\%username%\OneNote

Important for this to work are specific permissions for users who will be subject to OneNote Cache redirection script. Either a local GPO or Domain GPO needs to be configured on the device to give these users permission to ‘Create symbolic links’.

Under Computer Configuration -> Policies -> Windows Settings -> Security Settings -> Local Policies -> User Rights Assignment – Create Symbolic Links add the users you’d like to able to create symbolic links.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.