Logo of Computer Classes

How to empty the Trash automatically when shutting down Windows 11

We show you how to configure Windows 11 to automatically empty the recycle bin when we log out of our user account or turn off our Windows 11 computer

How to delete or empty the Recycle Bin in Windows 11 automatically when you turn off the computer.

1. Use Windows 11 search to open Notepad

2. When the new document opens, you will have to add the following text:

PowerShell.exe -NoProfile -Command Clear-RecycleBin -Confirm: $ false

3. Line followed you will have to click on File

4. Then, in the displayed menu, select the option: Save As ...

5. This will open a window in which you must indicate the location where you want to save the file.

6. In the TYPE field, you will have to select the option: All files (*. *)

7. As a file name and extension we must provide: Empty Trash Recycling.bat

8. Finally, click on: Save

9. Now it will be time to open the Local Group Policy Editor.

10. Once here, you have to go to:

Computer Configuration> Windows Settings> Scripts (Startup or Shutdown)

11. The following will be to double left click on: Off

12. Go to the tab: Scripts

13. Click the button: Add ...

14. A new window will open. In the Script name field you will have to provide the path of the file that we have created with the notepad.

15. Finally, you will have to click on the OK button to save the changes.

16. You must also click OK in the rest of the open windows.

how to clean the recycle bin every time you turn off windows 11

From this moment when we turn off our Windows 11 computer, the recycle bin will be automatically deleted when we turn off our computer.

Date update on 2021-10-19. Date published on 2021-10-19. Category: Computer class Author: Oscar olg Fuente: downloadsource