Recycle Bin Cleanup - Access Denied

I'm creating a script to clear the Recycle Bin for all users of any files older then 30 days.  When I execute the following code I get the access denied error below.  I am running this with my admin account which allows me to manually delete the files in this directory so I'm not sure why I'm getting this error.



July 8th, 2015 11:54am

The answer is that you should not be trying to delete files in users' recycle bins without using the correct APIs.

Free Windows Admin Tool Kit Click here and download it now
July 8th, 2015 12:19pm

Is there any way to "properly" clear other users recycle bin after a given length of time using powershell?  We have a big issue with users leaving files in their recycler and sending out reminders to clear them isn't doing the trick.  When we respond to low space on C: tickets the files get manually deleted anyway by our techs.  
July 8th, 2015 10:43pm

There is this:

http://www.fcleaner.com/recyclebinex

I have not tried it, however, and I don't know if it uses the correct APIs or not.

Free Windows Admin Tool Kit Click here and download it now
July 9th, 2015 10:38am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics