" /> steve.clarke.weblog: August 2005 Archives

« October 2004 | Main | September 2005 »

August 31, 2005

CMD.EXE - New tools

Ok, that last post got me digging for some new command line tools. I'm going to point them out here so I'll remember them later.

  • getmac - quickly grab just the mac addresses of your NICs without having to use ipconfig /all

  • openfiles - list open files without having to hassle with creating a MMC console

  • schtasks - I just found this one a few days ago when configuring some SharePoint scripts. I previously used AT, but needed to specify the run-as account. schtasks creates a proper "Scheduled Task" from the command line.

  • shutdown - I found this one a while back. Nice for doing a shutdown and restart, but unfortunately doesn't support doing a suspend or hibernate. Still useful.

  • taskkill and tasklist - What the?? I didn't realize these were included in the base XP/Server 2003 install! I've been using pslist and pskill from SysInternals for a long time, but it's nice to know that there's a command line kill available on any base install.
  • CMD.EXE

    I'm a big fan of automation. I'll write a quick script or batch file for just about every task I encounter to ensure adherence to the DRY (Don't Repeat Yourself) principle. Windows has gotten much better over the last few years at including some more powerful command line tools in the base install, but they aren't talked about much.

    I'm going to attempt over the next while to point a few of the ones I use or have recently discovered. A lot of times I'll just jump to a command prompt and start looking at the .exe files in the Windows folder just to see what's there. Another good way to find interesting command line tools is to open Windows XP "Help and Support" and search for "command line". (Actually, I just did that now and found a cool tool called eventcreate that'll create an event log entry -- I'll be using that in my batch scripts to make logging easier!)

    Anyway, watch this space...

    SharePoint Quota Gotcha

    Let's say you've created a SharePoint site and assigned a quota of 3GB, "just in case they need it". Now let's say the site currently contains 788MB worth of files.
    Q:
    How much disk space does it consume in the database?
    A: 3GB. Try exporting it using STSADM and you'll find that the backup file is approximately 3GB.

    This is something you should be aware of when setting quotas.

    I'm Back

    After a long time away, I'm back again. Even though the site has been active, the Movable Type install has been broken for many months after a botched 3.1 upgrade. I noticed today that 3.2 was released and decided to give it a try. The upgrade seems to have fixed things! Every now and then I get the itch to blog something, but haven't been able to. Now at least I'll be able to.