Alan's Blog

"Yeah. I wrote a script that will do that."

Create Import file for Remote Desktop Connection Manager 2.7

Posted on March 9th, 2015

Remote Desktop Connection Manager 2.7, “manages multiple remote desktop connections. It is useful for managing server labs or large server farms where you need regular access to each machine such as automated check-in systems and data centers. It is similar to the built-in MMC Remote Desktops snap-in, but more flexible.”  If you have been disappointed with Remote Desktops, then this bit of Microsoft freeware is what you want.

One of the nice things about the program is that it will import a list of server names.  My vbscript, RDPhistory.vbs, will export the list of recent connections you have made using the Remote Desktop Connection application.  Clean it up, and you have what you need to start.

Filed under Scripting, VbScript, Windows Administration | No Comments »

PowerShell:Start RDP After Reboot

Posted on March 3rd, 2013

A lot of folks have been asking me why I haven’t written any PowerShell scripts.  The answer is that I am pretty good at vbscript, and I couldn’t find anything that I wanted to do that I couldn’t do with vbscript.

Last week I spent some time waiting for a computer to reboot.  I used ping -t to watch the replies,  and then waited until I could use the Remote Desktop Connection (RDC) to connect using RDP.  I thought to myself, “self — you sure have spent a lot of time waiting for systems to come up”.  RDP2.ps1 is a PowerShell script that does the tedious watching for you.  It will wait for both the system and the remote access interface to come up, and then will launch the RDC to the computer.  You can run it interactively, or with the command line:

./rdp2.ps1 computername[:port] -WaitForReboot

The port is an option for nonstandard ports.  -WaitForReboot does just that.  If the system is still up when you launch the script, it will wait for it to reboot.

Like many first scripts, this is largely based on someone else’s work, see:  I made a large number of changes in addition to launching the RDC.   For those of you who have spent a lot of time with PowerShell, I am open to suggestions on how to make the code more elegant.

If you haven’t ever run a PowerShell script, you will find it is already installed on your Vista or later  machine, and on Windows 2008/R2 servers.  You must set the execution policy:

Set-ExecutionPolicy unrestricted

Revision note 3/4/2012:  I have updated the script to make the MsgBox SystemModal — which is required for it to have focus.

Tags: ,
Filed under Alan's Favorites, PowerShell, Windows Administration | No Comments »

Make RDP files

Posted on April 2nd, 2009

MakeRDPFiles.vbs is a vbscript based on the RDP History script posted earlier.  It take your RDP history and creates a folder with connection files for each of the systems you have previously connected to.  Rename from .txt to .vbs.

Tags: ,
Filed under Computing, Scripting | No Comments »

Remotely Enable Terminal Services and RDP

Posted on April 2nd, 2009

You build a Windows 2003 server and forget to enable RDP.  Very annoying.  Or you want to RDP to a workstation, and it is not set up.  Very annoying.  EnableTS_RDP.vbs allows you to remotely enable RDP.


Tags: ,
Filed under Computing, Scripting, Security | No Comments »

RDP History

Posted on January 8th, 2009

RDPHistory.vbs creates a text file with a list of systems you ever connected to using RDP.  Rename from .txt to .vbs


Tags: ,
Filed under Computing, Scripting, VbScript | No Comments »

Please Note

All the scripts are saved as .txt files. Newer files have a "View Script" button which will let you save or open a script in notepad. For earlier posts, the easiest way to download with IE is to right click on the link and use "Save Target As". Rename file from Name_ext.txt to Name.ext.

To see a full post after searching, please click on the title.

PowerShell Scripts were written with Version 3 or 4.

https connections are supported.

All new users accounts must be approved, as are comments. Please be patient. It is pretty easy to figure out my email address from the scripts, and you are welcome to contact me that way.

Site Search



SQL Site

Bad Behavior has blocked 262 access attempts in the last 7 days.