Sep 30, 2010
Learning the Wonders of Windows PowerShell
I’ve been using VBScript for systems management and task automation for many years. From working with Active Directory to manipulating files and folders, VBScript has been an excellent tool for me. I’ve read little bits and pieces about Windows PowerShell for a while now, and I always thought it would be too confusing to jump into without really having the time to devote to learning it well. I started using PowerShell 6 months ago for some basic Active Directory tasks because of the better integration, and it’s greatly simplified making mass changes to Active Directory.
In the past few days, a colleague of mine inspired me to dig into PowerShell a little more. I picked up a copy of Windows PowerShell Cookbook last night, and started reading this morning at work. This book has definitely made things easier to understand, so I definitely recommend it to anyone that is interested in learning PowerShell. Today, I ported a few VBScripts I use somewhat regularly to PowerShell, and was amazed at the reduction in lines of code needed to complete some of the tasks. For example, I wrote my most frequently used VBScript to delete all files in the Temp and Temporary Internet Files in all Windows XP user profiles on a machine. It was about 60 lines of code. I duplicated the functionality of that script in fewer than 10 lines of code. It surprised me to find I had more lines of comments than actual code!
Over the next few weeks, I’m going to finish up this book. In the process, I hope to create quite a few more scripts to help automate some of my management tasks, and I’ll share those scripts here.

Glad you’re enjoying it! Looking forward to seeing the script you write!
Lee, thanks for dropping in! Just posted the script I mentioned in this post. Thanks again for a great book!