Access Recycle Bin on a Remote PC

create share 676 Reputation points
2024-12-07T20:55:04.04+00:00

Hi,

I need to access the Recycle Bin of a domain user on a remote PC to delete or empty it, but when I access it through Windows Explorer, it shows the recycle bin of my PC instead of the remote PC. I don't want to use PSEXEC because it is not allowed.

Thanks.

Windows for business | Windows Client for IT Pros | Networking | Network connectivity and file sharing
Windows for business | Windows Client for IT Pros | Devices and deployment | Configure application groups
Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Marcin Policht 50,895 Reputation points MVP Volunteer Moderator
    2024-12-07T22:30:08.8833333+00:00

    Try any of the following:

    Method 1: Use UNC Path to Access the User's Directory

    1. Access the remote user's profile directory through the network share:
      • Open the Run dialog (Win + R) and type \RemotePCName\C$\Users\UserName Replace RemotePCName with the name of the remote computer and UserName with the domain user's profile folder.
    2. Navigate to the hidden Recycle Bin folder:
      • Enable the viewing of hidden and system-protected files:
        • In File Explorer, go to View > Options > Change folder and search options.
        • In the View tab, enable Show hidden files, folders, and drives and uncheck Hide protected operating system files.
      • In the user profile directory, locate the folder $Recycle.Bin
      • Open the folder corresponding to the user's SID (Security Identifier).
    3. Delete the contents of the Recycle Bin:
      • Select and delete the files/folders in the $Recycle.Bin folder.

    Method 2: Use PowerShell Remoting

    1. Enable PowerShell Remoting on the remote PC (if not already enabled):
      • Run the following command on the remote PC (can be done via Group Policy or other tools):
             Enable-PSRemoting -Force
        
    2. Use PowerShell to empty the Recycle Bin:
      • Open PowerShell on your PC and execute:
             Invoke-Command -ComputerName RemotePCName -ScriptBlock {
                 Get-ChildItem -Path "C:\$Recycle.Bin" -Recurse | Remove-Item -Force -Recurse
             }
        
      • Replace RemotePCName with the name of the remote computer.

    Method 3: Manually Browse the Hidden Admin Share

    1. Access the $Recycle.Bin folder on the remote PC via the admin share:
      • In File Explorer, open \RemotePCName\C$$Recycle.Bin
      • Navigate to the appropriate SID folder for the user.
    2. Delete the contents:
      • Select and remove the files in the $Recycle.Bin folder.

    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.