Tag Archive for 'windows'

Powershell? Yes

I have read over Scott Hanselman’s Tool List at least a dozen times. The first time I read it, I saw that Powershell was on his top 10. I knew a little about Powershell from Exchange 2007 but hadn’t taken any time to look at it.

About a month ago, I had to write some server maintenance scripts. Things like deleting files older than X days, SQL Server maintenance, etc. These tasks were perfect for scripting, so I picked up a Powershell book and went to town. It took a while to pick it up, but my overall impression of Powershell is wow. Powershell fills that void in the soul of Windows that developers hate. Now scripting in Windows doesn’t have to involve Cygwin and Perl, even though Perl will always stay close to my heart.

Powershell combines the ease of scripting with the power of .NET. It is a loosely typed language that can work with strongly typed objects from .NET. For me, it boils down to scripting objects instead of text. In Bash, grep and awk had to be used when parsing the output of any program. In Powershell, the output of a program is usually an object, which is much easier to work with.

The following line sums up why I love Powershell. It deletes files older than 14 days in a directory. While this is a trivial example, it is so simple, and so elegant.

gci c:\directory |  where { $_.LastWriteTime.AddDays(14) -lt [DateTime]::Now } | ri

Amazon Unbox + XBox = Joy; Goodbye Ubuntu

Yesterday I found this gem of an article on Amazon’s website. I wish I had known about it sooner.

I got home, and immediately tried it out. After about 1 minute, I was watching an on-demand video on my TV, through my XBox. Before, I thought I had to go through a VGA cable directly from my laptop, which is a pain. This is much better.

The quality isn’t HD; it looks to be about DVD quality. Even still, I think it is enough for me to cancel my satellite subscription and be completely on-demand. I only watch 2 TV shows, and the rest just waste my time. If only Discovery and History channels streamed over the internet, I wouldn’t miss satellite at all.

Also, I think this is the catalyst to get me to ditch my Ubuntu desktop for a Windows machine. Being able to easily have on-demand video is a perk like none other. At long last, I have given up what I so fell in love with a few years ago. I am sure this isn’t are last meeting, goodbye Ubuntu.