Script

PowerShell Power Story

I hadn't fully realized the power and simplicty of PowerShell until recently. My manager had asked if a script could be written that would take a CSV file of mailbox names, and hide them or unhide them. My co-worker, well-versed in VBScript, generated a 220 line solution that did just that. When I got into the office, I took that as an invitation to flex the PowerShell

Another great use for PSExec

Tired of searching through racks and racks of servers to not find what your looking for?

Tired of having to run back to your desk to remote into that server to insert a CD?

Utilizing the power of PSExec, you can eject the CD drive remotely without having to leave your comfy desk.

@echo off
if "%1"=="" goto end
echo Starting process to eject the CD on %1
psexec \\%1 -c "\\yourworkstationname\script$\ejectcd.exe"
:end

The Scripting Games Return!

One of the Scripting Guys contacted me last week asking for my bio. Evidently as one of the 55, 100% entrants from the 2006 Scripting Games, they want to do a spotlight piece on each of us. As part of my bio, I thought I'd include some exasperated picture (pulling out my hair?) and some tips to other contestants about programming contests. This reminded me of an article I posted here last year, that didn't make the cut after the hardware crash in September. So, from the archives, I present that original article.

Use PING to notify when server reboots.

Working on servers, you inveriably need to reboot them. One of the primary tools I use to determine if a server has shut down is to PING the server.

PING servername -t

This will PING the server repeatedly until I quit it. When the server goes down, it will return "Request Timed Out" instead of a valid PING response. Here is what it would look like when the server shuts down, then comes back up again.