How to: discover open files on Microsoft Server

So you’re working on a Microsoft Server machine, merrily getting stuff done, when you get a message saying that it can’t continue because files are open. Sound familiar? It happens to me often.

Here is how I find out which files are open and who has them open:

If you’re working on a Microsoft Server 2008,
Start | Administrative Tools | Share and Storage Management | Manage Open Files…

If you’re working on a Microsoft Server 2003,
Start | right click My Computer | Manage | Computer management (local) | System Tools | Shared Folders | Open Files

Makes it a great deal easier, now you know which file needs closing, and who you need ask to do it.

Hope that helps you. Anything you’ve found helpful? Let me know in the comments.

Command line terminal server

I’ve just come across a terminal server that wouldn’t let me log on. Turns out the maximum number of users the terminal server is licensed for has been exceeded.

Thusly, from another machine on the network, we open a command prompt and type
qwinsta /server:<servername>

This will give a list of the terminal server sessions on that server, note the ID number (aka sessionid) as we use them in the following commands.

We can reset a session by using
rwinsta <sessionid> /server:<servername>

or we can disconnect the session with
tsdiscon <sessionid> /server:<servername>

or we can logoff a session with
logoff <sessionid> /server:<servername>

Dan Rigsby has more info as does Scott Forsyth.

When SharePoint barfs

A client has a SharePoint installation that has died, with all their project files and data in it.

In the course of searching for how to resurrect it, I’ve found the following that seem to be things that others may well benefit from:

Possibly the biggest lesson here is to ensure that if your using SharePoint, make sure you back it up PROPERLY, ALL OF IT.

Evolving the ACT

It is now two weeks in to my new digs at Evolution Marketing – and it sure is fun.

Primarily I’ve been learning how to drive ACT!, software to take care of your contact management. Yesterday and today I’ve been playing with custom tables in the ACT! MS-SQL database. While ACT! looks after contacts and tasks, meetings & calls to do with your contacts really well, some clients would like to be able to do even more, like handle job sheets etc. Which is the reason for the custom tables. These allow us to track all sorts of other information and connect them to contacts & companies.

I’ve also setup a Blackberry Bold simulator and a Windows Mobile 6 Emulator, this allows me to experience the same things as our clients, notably HandHeldContact, which allows you to sync multiple calenders, notes, histories etc to your phone – loads more than MS Exchange alone allows.

To paraphrase the paragraphs above, I’m having fun learning new stuff!

The other staff at Evolution are great to work with, the coffee is good and all the tech toys I’ve asked for have been delivered, with the exception of the telephone headset, but it is on the way so they’re forgiven ;-). Woot!

Update 20th Oct: Got the telephone headset on Friday afternoon. Cool.

Which version of .NET

Sometimes while supporting products, it is very useful to know just what version/s of .NET are installed.

Found this tool just now shows you just that: Free DotNet VersionCheck Utility

If you’ve ever wanted a quick way to find out which versions and service packs of the .NET runtime are installed on a machine, or if you’re trying to resolve a ‘missing mscoree.dll’ error, then DotNET Version Checker is for you.

VersionCheck itself does not depend on the .NET runtime.

VersionCheck will also tell you whether you have the required Windows components to run .NET applications, and will prompt you with download locations if not.

Update: this page at Microsoft lists the downloads for .NET in the left menu bar.

Open Source administrator tools

Spotted this great list of open source tools for system administrators: 24 Great Open Source Apps for Admins & Technicians.

I can personally vouch for a number of these:

  • Angry IP Scanner
  • PuTTY
  • DBAN
  • DeltaCopy

For some tools that are not open source but free, you can’t go past live.sysinternals.com (details here) – now owned by Microsoft themselves these tools make a Windows Sysadmin job much easier.

Resurrecting Terminal Server

A Terminal Server I was attempting to work on today gave quite a lot of grief. The first hint was that users were unable to login to it. When I then tried to login, it gave an error message of:
Login Failed
You are connected to the remote computer. Howerver, an error occured while an initial user program was starting, so you are being logged off. Contact the system administrator for assistance.

So I rebooted it remotely using the command shutdown /r /f /m \\TSERVER1 while having a continuous ping running, from the ping results I could see it go down, come back up. However on trying to login now, after entering a username/password I could see the logon script run, but no taskbar, start button appeared. Right clicking the desktop didn’t give any menu.

I could however navigate to the hard drive on that machine by pointing My Computer to \\tserver1\c$\.

Copying some of the tools at live.sysinternals.com I was able to view the event logs, no issues apparent, check status of various services, all ok.

So I connected via RDP once more (mstsc /v:tserver1 /console) and viewed the background (still no start button or taskbar) and pressed CTRL-ALT-END which allowed me to start the Task Manager. This allowed me to run a new task (File | New tas (run...)) so now I was able to copy the sysinternals autoruns program to the root of the C: partition, and run it from the affected terminal server. Running c:\windows\explorer.exe didn’t work tho.

Delving into it’s depths I found an entry for HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\Explorer – renaming this entry then allowed Explorer to run. So I’ve exported the key (in case I do want it sometime) and then deleted it.

Rebooted the server once more and bingo, it lets everyone log in. Very satisfying after a couple of hours of mad hair tearing.