Earlier this year I wrote an article for REDMOND Magazine about the new backup features in Windows Server 2008 R2. I’m not going to re-hash the article here except to say it includes some sample scripts on using the WBADMIN command line tool. One of the scripts is an old-school batch file.

The batch file included code to create a directory that included a time stamp, like \\mycompany-dc01\backup\RESEARCHDC\12152009_132532 where the last portion is the month, day, year, hour, minute and second. My original code parsed out these values from the %TIME% variable.

Unfortunately, I forgot to take into account situations where the time mght not have two digits like 1:00AM. In those situations the code tries to create a folder like \\mycompany-dc01\backup\RESEARCHDC\12152009_ 10000 which fails because of the space. To correct this I needed to add a line to check for the space in the variable, %h% and if found, define a new value with a leading 0.

This sort of thing is much, much easier in Windows PowerShell, by the way. But regardless, I now have an updated batch file.
[cc lang=”DOS”]

You can download the batch file here. Rename it to .bat.

TechMentor Orlando 2010 Decks and Demos

I had a great time in Orlando at the TechMentor conference. The crowd was enthusiastic and asked good questions. As promised, here are my slide decks and demos. My sessions tend to be heavy on demonstration so I can’t promise you’ll get a ton of value from the decks alone.  You’ll simply have to attend the next TechMentor.

Scripting, Error Handling and Debugging in Windows PowerShell

Top Ten Command Line Tools Every Administrator Should Know

Take Back Your File Server (slides only as demos were live)

I owe the attendees of my error handling and debugging session some additional information since I ran short of time. Stay tuned for future posts on debugging PowerShell 2.0.  Cool stuff.

If you were in one of my sessions and have a follow up question, feel free to post a comment or email me directly: jhicks at jdhitsolutions.com.  Thanks for all your support and enthusiasm.

In the Beginning and at the End was the Command Line

I just finished reading a terrific essay (or short book) on the nature of operating systems and how we interact with them. The book is In the Beginning…was the Command Line by Neal Stephenson. The book was written about 10 years ago so some of the material might seem a little dated. But for those of us in the industry at the time it makes for a warm reminiscence for the good ol’ days. And if this was before your time, I think it makes for a helpful history lesson which explains a lot about where we are today. For a Neal Stephenson work, this book is exceptionally brief, but well written (you were expecting otherwise?) with more than a few illuminating metaphors.

Continue reading

TechMentor Spring 2010

If you are thinking about what conferences to attend next year, I hope you’ll consider joining me in Orlando for the Spring TechMentor show. The show runs March 8-12, 2010 in sunny Orlando, FL. This is a great show where you can take away a ton of information that you can put to work immediately. The presenters want to give you information you need NOW.  It’s not a giant show like TechEd which makes it very easy to network with others and really get to know the speakers.  Personally, I love hanging out with people and am more than happy to have my brain picked over.

I have sessions on PowerShell, file management, and Windows administration. Afterwards I’m happy to chat about whatever is on your mind.

Oh…if you have some books you want signed, bring ‘em along. Especially if you want the Windows PowerShell 2.0: TFM signed. This will be one of the rare times when Don and I will both be in the same place at the same time.

Learn more about all the other sessions and register at http://techmentorevents.com/events/techmentor-spring-2010/home.aspx.  I hope to see you there and that you’ll stop by and say ‘Hi’.