+ Post New Thread
Page 2 of 2 FirstFirst 12
Results 16 to 22 of 22
Windows Server 2008 R2 Thread, Home Folder Recycle Bin Deletion in Technical; To hide the Recycle Bin on the desktop, you enable the policy - User Config > Policies > Admin Templates ...
  1. #16

    Michael's Avatar
    Join Date
    Dec 2005
    Location
    Birmingham
    Posts
    9,248
    Thank Post
    239
    Thanked 1,567 Times in 1,249 Posts
    Rep Power
    339
    To hide the Recycle Bin on the desktop, you enable the policy - User Config > Policies > Admin Templates > Desktop - Remove Recycle Bin icon from desktop - Enabled and/or Hide and disable all items on the desktop (optional).

    I suspect it is the same/similar with Ranger, although I cannot be 100% as I don't use it.

    The Recycle Bins in Windows 7 will still be created (in each redirected folder), they just won't be used, but they should be hidden from the end user anyway.

  2. #17
    zag
    zag is offline
    zag's Avatar
    Join Date
    Mar 2007
    Posts
    3,746
    Thank Post
    895
    Thanked 414 Times in 348 Posts
    Blog Entries
    12
    Rep Power
    85
    Quote Originally Posted by Michael View Post
    On your file server, navigate to Control Panel > Folder Options > View, untick Hide protected operating system files (recommended)

    Navigate to a user home directory and at the top right search for recycle

    You can then delete all this and the system will re-create them (as standard).

    By enabling the GPO: User Config > Policies > Admin Templates > Windows Components > Windows Explorer - Do not move deleted files to the Recycle Bin - Enabled this will stop your server quickly filling up!

    Remember to re-tick Hide protected operating system files (recommended) when you're done
    Thanks for this, just done it and it worked perfectly.

    One problem I had was with files over the 255 character limit but a little renaming fixed those as well.

  3. #18

    Michael's Avatar
    Join Date
    Dec 2005
    Location
    Birmingham
    Posts
    9,248
    Thank Post
    239
    Thanked 1,567 Times in 1,249 Posts
    Rep Power
    339
    Glad it worked for you

  4. #19
    eddyc's Avatar
    Join Date
    Aug 2008
    Location
    Bristol
    Posts
    432
    Thank Post
    98
    Thanked 47 Times in 43 Posts
    Rep Power
    21
    Quote Originally Posted by ChrisMiles View Post
    You can use powershell on your file server and run the following in the root of your home drives folder:

    Code:
    $recycleBins = Get-ChildItem "$RECYCLE.BIN" -Recurse -Force
    foreach ($recycleBin in $recycleBins) { $recycleBin.Delete($true) }
    This code does not appear to work for me. Is it definitley correct? I can see lots of $RECYCLE.BIN folders in all of the students home folders that I need to remove. I've now corrected not to use the recycle bin in gpo but still need to delete the existing folders and contents.

    Thanks, Ed

  5. #20
    eejit's Avatar
    Join Date
    Jun 2005
    Location
    Ireland
    Posts
    606
    Thank Post
    52
    Thanked 12 Times in 12 Posts
    Rep Power
    22
    As others have mentioned there is a little error in the PowerShell code.
    Code:
    $recycleBins = Get-ChildItem "$RECYCLE.BIN" -Recurse -Force
    foreach ($recycleBin in $recycleBins) { $recycleBin.Delete($true) }
    "$RECYCLE.BIN" should be '$RECYCLE.BIN' otherwise the folder gets interpreted as a variable.

    I've just used this and it flew through the data getting rid of GBs of recycled data almost instantly
    Code:
    Get-ChildItem -Path '$Recycle.bin' -recurse -force |Remove-Item -recurse -force
    As usual, test yourselves first on some practice data.

    Cheers.

  6. #21
    mrstrong's Avatar
    Join Date
    Nov 2010
    Location
    England
    Posts
    58
    Thank Post
    21
    Thanked 4 Times in 4 Posts
    Rep Power
    8
    Our users seem to have several $Recycle.bin folders e.g. for the home folder Z: we have
    four recycle bins under
    Z:\
    Z:\My Music
    Z:\My Pictures
    Z:\My Videos

    Is this normal ? I guess I need to delete all four to clean up ?

  7. #22
    mrstrong's Avatar
    Join Date
    Nov 2010
    Location
    England
    Posts
    58
    Thank Post
    21
    Thanked 4 Times in 4 Posts
    Rep Power
    8
    deleted all four and seemed to do the trick with no adverse effects

SHARE:
+ Post New Thread
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 4
    Last Post: 26th September 2011, 02:12 PM
  2. Unshare/delete multiple home folders
    By DreCon in forum Windows
    Replies: 2
    Last Post: 5th October 2010, 03:04 PM
  3. Mass Delete Users Home Folders
    By Techie101 in forum Windows Server 2000/2003
    Replies: 4
    Last Post: 13th July 2009, 03:26 PM
  4. Replies: 5
    Last Post: 9th March 2008, 12:15 AM
  5. Urgent Help!!! Year 10 folders have been deleted
    By StewartKnight in forum Windows
    Replies: 37
    Last Post: 9th December 2005, 08:22 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •