Saturday, June 17, 2006

Shell is coming to Windows

Today marks the one month milestone of this blog, although there hasn't been any new post.I have a lot technical oriented stuff to say and hopefully I will post more in the future.

I played with Windows PowerShell again yesterday. I installed it a while ago but it was very unstable so I didn't bother to give it a deeper look.
Supposedly this is one of the Windows strategies to catch up with *nix in system automation therefore it's worth another try. I downloaded the latest release candidate version and the good news is it didn't let me down this time.

Installation was easy and it requires .NET Framework 2.0. Starting the shell is somewhat slow as it runs on top of CLR. In my opinion, the most significant difference between traditional *nix and Windows PowerShell shells is *nix shells use text-based processing whereas the PowerShell uses object models based on the .NET platform.

Let me try to get all the files updated in June, 2006

PS C:\> dir | Where-Object{$_.LastWriteTime -like "*/06/2006*"}

Directory: Microsoft.PowerShell.Core\FileSystem::C:\


Mode LastWriteTime Length Name
---- ------------- ------ ----
d-r-- 14/06/2006 9:20 AM Program Files
d---- 14/06/2006 8:48 AM WINDOWS

hmm not bad. I think under the hood, the result of the dir command is contained in an object and then the object gets piped to the Where-Object command for querying.

Unlike *nix shells, files in PowerShell are still recognized by their extensions. PowerShell script has an very awkward extension "ps1", hopefully this will be changed in the final release.

check out http://channel9.msdn.com/wiki/default.aspx/Channel9.MSHQuickStart


AgileCoder:Operating-Systems

No comments:

Influence: The Psychology of Persuasion

Amazon Page ISBN-13: 978-0061241895 ISBN-10: 006124189X Do I recommend: Yes Key Takeaways Author uses a ...