Clear or selectively delete Remote Desktop Connection history

Remote Desktop Connection (RDC) is a powerful tool that allows users to connect to a computer from a remote location. With RDC, users can access their own desktop, applications, data, and other resources from anywhere with an internet connection. Unfortunately, this convenience can also lead to a buildup of stored connections in the user’s profile, leading to an increase in the size of the profile.

If the user’s profile is getting too large, IT admins may need to clear out the stored connections or selectively delete them. One way to do this is to delete the stored connections manually. To do this, the user needs to go to the Remote Desktop Connection (RDC) client and go to File > Options > Advanced. Under the “Connections” heading, the user will see a list of the stored connections. The user can then delete the connections they no longer need by clicking the “Delete” button.

Another way to clear out the stored connections is to use a PowerShell script. This script can be used to delete all of the stored connections or delete them selectively. To use the script, the IT admin will need to open PowerShell and run the following command:

Get-StoredCredential | Remove-StoredCredential

This command will delete all of the stored connections. If the IT admin wants to delete only specific connections, they can use the following command:

Get-StoredCredential | Where-Object {$_.TargetName -eq ‘myconnectionname’} | Remove-StoredCredential

In this example, the IT admin can replace ‘myconnectionname’ with the name of the connection they want to delete.

A third way to clear out the stored connections is to use the Local Group Policy Editor. This can be done by going to the Group Policy Editor and navigating to User Configuration > Administrative Templates > Windows Components > Remote Desktop Services > Remote Desktop Connection Client. Then the IT admin needs to enable the policy “Delete cached copies of roaming profiles”. This will delete all of the stored connections from the user’s profile.

Finally, the IT admin can also use a logon script to delete the stored connections. To do this, the IT admin needs to create a batch file and add the following line to it:

rdpcli /delete

This command will delete all of the stored connections for the user.

Clearing or selectively deleting the stored connections in Remote Desktop Connection is an important task for IT admins. Fortunately, there are several ways to accomplish this task. IT admins can manually delete the stored connections, use a PowerShell script, use the Local Group Policy Editor, or use a logon script. Each of these methods has its own advantages and disadvantages, so the IT admin should choose the one that best fits their needs.

Inquire Now

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Find your next full or part-time role here

ScaleDesk can either help you find your next full time gig or a part time side gig where you can create extra income!

Onboard with us once
Skip HR screening and go to the final interview with with only your resume and a video interview you never have to redo
Get paid electronically every month for the hours you work
We will be your reference even if you work for us once

IT Teams: Use ScaleDesk to augment your team

Schedule Demo