Resetting Terminal Services Connections

A few days ago at work, I went to connect to a headless server at work, and it indicated that I couldn’t connect because all the Terminal Services connections were in use. What now?

There are graceful ways around the issue. You can (a) Reset one of the connections remotely, freeing up room for you, or (b) Connect to the computer’s console session and then reset the sessions from a GUI interface.

Resetting connections remotely. This method is more graceful, but requires a bit more work. As Scott Forsyth described in Managing Terminal Services Sessions Remotely, the qwinsta (query windows station) and rwinsta (reset windows station) commands can help you accomplish this.

Use qwinsta to find a session to clear, or reset:

C:>qwinsta /server:MyServerName
SESSIONNAME USERNAME ID STATE TYPE DEVICE
0 Disc rdpwd
rdp-tcp 65536 Listen rdpwd
console 5 Conn wdcon
rdp-tcp#59 MyUserName 2 Active rdpwd

In this example, “MyUserName” has a session, and I could clear that session to take it’s place. To do that, I would use rwinsta to clear the session, which has an ID of 2:

C:>rwinsta 2 /server:MyServerName /V
Resetting session ID 2
Session ID 2 has been reset

With the session being reset, I could now successfully login with Remote Desktop.

Connecting to a console session. Windows will always have a console session, which is the session that represents the session outputting to the physical monitor, if one were plugged in. If a user were logged into the machine and physically using the mouse, keyboard, and monitor that are plugged into the machine, and you then connected remotely to the console session, their session would be disconnected and you would connect to that console session. Obviously, this is not the typical approach you would want to take, but it is an option when you need to force yourself onto the computer.

Basically, this is accomplished by running Remote Desktop from the command line (mstsc) and invoking the command line argument to connect to the console session.

mstsc -v:MyServerName -console

That’s all there is to it! At that point, you can either proceed with your work or use the console session to clear any other Terminal Services sessions in the Terminal Services control panel.

Generate Awesome AJAX Loading Animated GIFs

When you’re putting some AJAX functionality in your site, you naturally need to provide some UI feedback elements to let the user know when you’re pulling data down from the server. If you’re all about the code and find it painful to do graphic design (like me), you’re not about to whip out any kick-butt Web 2.0-ish graphics to provide that feedback.

Now you don’t have to. The awesome Ajaxload service will generate a variety of typical AJAX loading animated GIFs that you can customize to your site’s color scheme. Awesome!

iPhone Monday

What’s that sound?

It’s the sound of a million Mac rumor addicts exhaling on what I’m calling “iPhone Monday”.

Last Friday, Brian Lam made a misleading post about Apple’s supposed iPhone coming out today. How did the Mac rumor club react? The term “hook, line, and sinker” comes to mind. To their credit, that’s a bit harsh; everyone seemed to recognize that it seemed a tad fishy. (a) Apple normally releases their hardware on a Tuesday. (b) The iPhone was previously rumored to be announced at MacWorld, which would have made today’s announcement exceptionally early. (c) The catalyst rumor post was noticeably vague.

Nevertheless, everyone woke up on Monday and checked Apple’s website. When no news was to be found, everyone undoubtedly went to their feed readers, scouring new entries for an explanation. Alas, Gizmodo pulls out the punchline. The iPhone Lives: But the Trademark Belongs to Cisco.

Let this Monday be a lesson to everyone that the rumor mill has become too eager and too gullible. Don’t get me wrong; I read the rumor sites too, and maybe that’s the problem. We can’t stop reading due to our insatiable curiosity over what will be coming down the pipe. And perhaps our readership only encourages the rumor sites to keep it up.

Unfortunately, we’re going to have many more iPhone Mondays.

I Recant My Adobe Doom

Back when I heard that Adobe would be acquiring Macromedia, I mourned the fact and called it a dark day for ColdFusion.

Well, I wasn’t alone. Adobe didn’t have anything that really impresses web developers. They’re too print oriented. And their forays into web development software were generally disliked, especially by the Macromedia crowd because, whether we used it for coding or not, we recognized Macromedia DreamWeaver as a superior product to Adobe GoLive. Photoshop obviously wins over Fireworks, but Photoshop is expensive and bloated for most web developers’ graphics needs. And Flash was viewed as the cherished child that was probably a motivating force for the acquisition.

In the early days of the acquisition announcement, there were many questions. Is Adobe making the acquisition to just kill off some competition? They wouldn’t axe DreamWeaver for GoLive would they? Am I going to have to buy Photoshop for my occasional graphics work now? And most importantly, would they deem ColdFusion a waste of time and scrap it? Or considering their unimpressive web software offering, would they botch up ColdFusion, losing its appeal?

It may be a different genre of software, but my sadness greatly reminded me of Bungie’s acquisition by Microsoft. The greatest game software company of all time gets swallowed whole by the blandest company of all time. Surely, Microsoft would absorb the Bungie employees into its insipidity, much to everyone’s dismay! Although that may have been a bit extremist, the acquisition has had its downsides.

In Macromedia’s case, it frankly is still too early to tell with certainty what the long-term effects may be. Although previews look good, the new version of ColdFusion hasn’t been released yet. Neither has a version of DreamWeaver. And we have yet to see what Adobe’s “Macromedia Suite 8″ equivalent upgrade will look like.

But Adobe at least appears to have a keen interest in the continuing development of ColdFusion. The same team has been able to continue developing it, now with just more dollars available for research and development. CFMX 7 Hotfix 3 came out just recently. Ben Forta is still the ColdFusion evangelist. Things appear to be well, and there are no apparent issues to worry about. Furthermore, great things have been happening with Flex, showing Adobe’s keen interest in and vision of that venue.

Being primarily a ColdFusion developer, those were my obvious chief concerns, now addressed. What happens to the Macromedia Suite is really just gravy to me, especially now that I use Eclipse as my IDE. Although I would think poorly of Adobe for eliminating DreamWeaver–and there are reasons to suspect that they do not plan to–it ultimately wouldn’t impact me.

Sorry for my doom saying, Adobe. You don’t have the love I had for Macromedia, but give it time and attention, and you might get there. :-)

  Theme Brought to you by Directory Journal and Elegant Directory.