Forum Discussion
koakenred
Mar 28, 2020Copper Contributor
Intune Policy for automatically emptying downloads Folder
Hi i am new to Microsoft Intune. I am looking for way to automatically empty the download folder when a user logs out. I previously had a powershell script that had to be configured on every workstat...
Thijs Lecomte
Mar 30, 2020Bronze Contributor
Hi
I wouldn't create a specific Powershell script, but utilize a built-in feature from Windows 10, called Storage Sense.
Storage Sense can automatically cleanup certain unused files and also files in the Downloads.
check out this blog for more information:
https://www.petervanderwoude.nl/post/configure-storage-sense-via-windows-10-mdm/
You are looking for the 'ConfigStorageSenseDownloadsCleanupThreshold' setting. If you put that at '1', all downloads are deleted after one day of not being opened.
KnightOfNerd
Mar 11, 2021Copper Contributor
This is really helpful, however, can this be used for the exact use case i.e. clear downloads on each logout?
- Thijs LecomteMar 11, 2021Bronze ContributorThere is no built-in way to do this. You would have to create a scheduled task through Intune to do this