Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

Clear Most Recently Used – Remote Desktop

Posted on July 18, 2013October 26, 2015 By David Kittell
' Script: ClearRDMRU.vbs
'Purpose: Clears the Most Recently Used list of computers in the Remote
'Desktop Client Computer drop down box
' Author: Brian Heil
' Date: 15 March 2004
'Version: V1.2
'History:
' V1.0 - first script.  used WMI to delete registry entries.
' V1.1 - added deletion of Default.RDP file to clear the computer box as well as the dropdown.
' V1.2 - changed to wscript RegDelete method, sped up deletion loop significantly.

On Error Resume Next

Set WSHShell = WScript.createObject("WScript.Shell")
Set File = CreateObject("Scripting.FileSystemObject")
MYDocs = WSHShell.specialfolders("MyDocuments")
For i = 0 to 9
WSHShell.regdelete "HKCUSoftwareMicrosoftTerminal Server ClientDefaultmru" & i
Next
        'Deletes the Default.RDP file in the current users My Documents directory.  This holds the value
        ' in the default value in Computer box in the RDC
        File.DeleteFile(MyDocs & "default.rdp")
        MsgBox "MRU List Cleared." & vbcrlf & junk,64,"Success"
Originally Posted on July 18, 2013
Last Updated on October 26, 2015
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code Windows VBS

Post navigation

Previous post
Next post

Related Posts

UNIX – Create New User & Add To Group

Posted on August 5, 2016

username="dkittell" usergroup="developers" useradd $username && passwd $username # Set initial password # Force user to change password once logged in chage -d 0 $username groupadd $usergroup usermod -aG $usergroup $username All information on this site is shared with the intention to help. Before any source code or program is ran…

Read More

Ektron Alias List

Posted on October 29, 2013October 26, 2015

SET NOCOUNT ON DECLARE @Domain VARCHAR(50) SET @Domain = ‘<domain>’ SELECT AliasName ,(@Domain + alias_pagename) AS AliasURL ,(@Domain + alias_logical) AS ActualURL ,content_id ,content_language FROM url_alias_tbl LEFT OUTER JOIN UrlAliasManual_Tbl ON UrlAliasManual_Tbl.aliasid = url_alias_tbl.alias_id ORDER BY AliasName SET NOCOUNT ON DECLARE @Domain VARCHAR(50) SET @Domain = ‘<domain>’ SELECT (@Domain +…

Read More

PowerShell – Azure – Get-AzurePublishSettingsFile

Posted on September 13, 2016

Get-AzurePublishSettingsFile mkdir c:\temp mkdir c:\temp\PowerShell mv ‘~/Downloads/*.publishsettings’ c:\temp\PowerShell Import-AzurePublishSettingsFile -PublishSettingsFile ‘C:\temp\PowerShell\*.publishsettings’ All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • Open On Screen Keyboard (OSK)
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes