gshaw Posted November 8, 2017 Posted November 8, 2017 I think the main issue is the one that it wont auto remove from local, you have to manually do this, there is no option to 'Free up space' on the local machine on logoff etc. Really annoying to say the least, I have looked through the reg but can not find anything that relates to that command on the right click of the onedrive in explorer. I have also checked the latest ADMX files and there is nothing there either. I wonder if scripting something with the attrib command mentioned here may do the trick? Would be interesting to see what happens in the file system using Process Explorer when you manually click the "Free up Space" button. https://techcommunity.microsoft.com/t5/OneDrive-Blog/OneDrive-Files-On-Demand-For-The-Enterprise/ba-p/117234 Attrib.exe Files On-Demand is designed for the flexible nature of enterprise content and scenarios. The choice of whether a file is locally available or online-only is scriptable by admins. This means admins can define a policy to automatically choose between a file taking up space and accessible with no network connection and file downloading when the user interacts with it. This is possible because Files On-Demand uses the NTFS file system attributes as way for admins, applications, and users to express the state desired. New filesystem attirbutes were added to NTFS to support this scenario and commands were added to Attrib.exe so the process is scriptable. Attrib.exe enables 2 core scenarios. “attrib -U +P /s”, makes a set of files or folders always available and “attrib +U -P /s”, makes a set of files or folders online only. Because Attrib is directly accessible from PowerShell this means it can also be leveraged with tools like regular expression matching to apply to a set of documents important to your organization. Below is an example of using “attrib -U +P /s” to automatically make benefits documentation available on the device for every user.
gshaw Posted November 8, 2017 Posted November 8, 2017 (edited) Just tried it and seems to work fine doing this... cd "%userprofile%\Onedrive - Name of your Organisation" attrib +U -P /s Works instantly Edited November 8, 2017 by gshaw 2
wickit Posted November 9, 2017 Posted November 9, 2017 Just tried it and seems to work fine doing this... cd "%userprofile%\Onedrive - Name of your Organisation" attrib +U -P /s Works instantly Perfect, works like a charm. Will add this to a logoff script
gshaw Posted November 9, 2017 Posted November 9, 2017 (edited) Perfect, works like a charm. Will add this to a logoff script Enjoy! Keep testing and let us know how it goes. In our testing so far we can flip all files from completely synced to online-only and it does clear the cache down as you'd expect. Have blogged this and a few other tweaks for the new OneDrive experience for anyone interested... https://gshaw0.wordpress.com/2017/11/08/onedrive-files-on-demand-first-steps/ Edited November 9, 2017 by gshaw
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now