Time to give PowerShell another try

Today, I transferred our pictures and videos from the weekend to my PC and then diligently started tagging them... I accumulated more than 10K pictures @year since my daughter was born. It's clear that I need a lot of Tagging to do. Then it occurred to me that I could possible use the folder structure I've been using to do some of the tagging.

I use the following structure for media files

Root |
| {Year}

So, I could probably tag all my pics with at least year and month information and possibly add event too... and I thought PowerShell should be perfect for such file manipulations. There is a slight problem though. I am not sure how to code it... Well that brings us to our subject matter.

I was very excited when MS announced MSH (Microsoft Shell), which later was renamed to PowerShell. The moment I heard that it did not have any remote capabilities, I thought it would not go far. I still wanted to give it a shot but syntax was terse; I did not like it.

Windows 7 is out with PowerShell 2 and I have changed my mind about it; I think it's time to give it another try. There are a couple of reasons I think it's valuable to learn it:
  • Resources are not scarce: There is now a large enough community coding in powershell; which means it's possible to find resources
  • .Net!: I've been reading 'learning C#' books, and understanding whole that .net world makes understand PowerShell easier. It works the other way too.
  • MS Emphasis on PowerShell: Microsoft seems to be going full speed in making Powershell the premium scripting language for all products as well as OS.
  • It really is powerful: The more I read about it, the more I understand how powerful it is. Well, I still do not like the syntax but I am used to Perl; I am sure I can get used to it too :p
No, I have not yet figured out the language fully, although I am more comfortable with it now that I read some material. I encountered Keith Hill's blog, there are tons of useful material there and even better, he has compiled his "Effective Windows Powershell" posts into a single pdf file. I just finished reading it and found it quite useful.

I will probably post the solution I come up with about the original tagging issue, but right now I am just trying to take in as much as I can before going all out scripting. Who would think PowerShell could be fun too? :p


Windows - First Report

So far, I am loving it. It seems to be a rock solid build, at least as fast as Vista. New taskbar takes sometime to get used to but after that seems more intuitive. The only annoyance I noticed is when an application prompts user, it does not stick out and there is not an easy way for user to tell it is pending for action unless that user clicks that group.

For example, if I am downloading, say Citrix ICA client and switch to another application, I would not know download finished and it's waiting for me to click "run" button unless I pay extra attention to it.

On my laptop, I also noticed an interesting situation which was not there until the final build. When I simply close the screen, I expect it to go to sleep mode. It seems to do that but every time I put the screen back up; it displays a dos window as if it is booting and even asks me if I would like to boot from the CD if I have one in the tray. If I click the "Suspend" button though, this does not happen.

Lastly, I did upgrade to Windows 7 Home Premium from Vista Home edition, and noticed that a couple of application got broken. Newsleecher is one of them; I had to re-enter activation code. PowerDVD is another one; which simply launches and disappears immediately without any messages.

The new action center is a great way of finding out solutions to problems. I see some gusvc error as in the form

Log Name: Application
Source: gusvc
Date: 8/18/2009 4:22:10 PM
Event ID: 0
Task Category: None
Level: Information
Keywords: Classic
User: N/A
Computer: XXXX
The description for Event ID 0 from source gusvc cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event:

Service stopped

Event Xml:
Service stopped

but not sure what's wrong with Google Updater. It did not seem to be affecting any functionality in Picasa or Chrome (from which I am typing this).

The other error, which again does not seem to be breaking anything I use is from Adobe (suprise?) Air

Log Name: Application
Source: SideBySide
Date: 8/15/2009 4:03:48 PM
Event ID: 63
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: XXXX
Activation context generation failed for "C:\Program Files\Common Files\Adobe AIR\Versions\1.0\Adobe AIR.dll".Error in manifest or policy file "C:\Program Files\Common Files\Adobe AIR\Versions\1.0\Adobe AIR.dll" on line 3. The value "MAJOR_VERSION.MINOR_VERSION.BUILD_NUMBER_MAJOR.BUILD_NUMBER_MINOR" of attribute "version" in element "assemblyIdentity" is invalid.

Other than these little annoyances, it's working like a champ!


Is this cool or what?

Tony Darnell of has masterfully edited this and some more on his youtube page.


The 40 most popular SA tools

Sunbelt's NTSYSADMIN was one of my favorite lists for years. These folks gathered a list of 40 most popular SA tools. Take a look.