

You can add an extra operation to check the current size of the user profile folder before and after the cleanup (it allows you to get more accurate information, but takes some time).If your users use it and the Chrome cache takes up a lot of space, uncomment the lines with the paths The lines that clear the Google Chrome cache are commented out in the script.The Windows Error Reporting (WER) folder in a user profile is cleaned.It will also clean up the RDP connection history and cache.All information about deleted files will be saved to a text log file (you can disable this after debugging the script on test users).We also recommend configuring RDS session timeouts to end sessions after a period of inactivity automatically. If used in an RDS environment, ensure that users click the Logout/Login button to end their sessions. You can add this command to your GPO logoff scripts to clear the recycle bin when a user signs out: If you run this command as a common user on an RDS host, only the recycle bin of the current user will be cleared.

In order to empty the Recycle Bin without prompting, run the following command: To clear the Recycle bin in Windows, you can use the Clear-RecycleBin cmdlet (available in PowerShell 5.1 and newer on Windows 10). Setting this to 0 disables the recycle bin on all drives.

The maximum Recycle Bin size is set as a percentage of your disk size. You may set the maximum Recycle Bin size for users with the Maximum allowed recycle bin size GPO option under User Configuration -> Administrative Templates -> Windows Components -> File Explorer. However, this will only change the recycle bin settings for the current user. Here you can also disable the Recycle Bin completely using the Don’t move files to the Recycle Bin option. You can change the maximum size of the Recycle Bin on each drive in its properties. The default size of the Recycle Bin in Windows is about 5% of the disk size.
