Forum Discussion
Travis_78
Dec 05, 2022Iron Contributor
OneDrive with FSlogix in an AVD environment how to prevent profile bloat
We are implementing onedrive to hold known folders (Documents, Pictures, Desktop) and want these files to be "on demand" by default. We have it set via GPO. The main question is, how do I make sure t...
Micha118835
Mar 07, 2023Copper Contributor
You can try to create a scheduled Task with the Command "c:\windows\System32\cleanmgr.exe /autoclean /d C:" on User Logon with a delay of 5 or 10 Minutes.
This will trigger a cleanup for the User.
When you use the Powershell Script for configure Storage Sense with OneDrive, this command also cleanup OneDrive Files.
steveturnbull1975
Mar 28, 2023Brass Contributor
Thanks this give me a direction on where to look for a solution. I didn’t bother with storage sense because it seems like not a useful feature for vdi sessions unless someone is logged
On for more than a day. I tested it over 8 hours of a logged on session and it did nothing.
On for more than a day. I tested it over 8 hours of a logged on session and it did nothing.
- Travis_78May 10, 2023Iron ContributorThats the thing. I am not sure what Microsoft wants us to do here. Do they want us to support onedrive with fslogix profiles in AVD, or not? What is the best practice for one drive in an AVD environment? I cant get a straight answer from them.
- steveturnbull1975May 10, 2023Brass ContributorI’ve basically just created a scheduled task that runs 30 mins after a user logon. It scans the users onedrive folder and checks for any files that haven’t been accessed for more than 60 days. If there are any it uses the attrib command to set them back to online only mode. The version of fslogix we use we have the auto shrink/compaction at logoff providing it’s cleaned up enough files to warrant that it will run. We also run our own fslogix shrink script written by Jim moyle each month to help. This process has helped keep the profiles under control with minimal growth over the past few weeks.
It’s a bit ridiculous that people are having to invent their own solutions for this issue when it should just be part of a onedrive policy- sof_bradMay 17, 2023Copper ContributorIs the scheduled task you created based off the script you linked above or something different? If possible, can you share your full sanitized solution?
I am in a similar situation, but it's exacerbated by the fact that we have a very aggressive deallocation automation setup to deallocate after 2-3hrs idle.