雪夜读书
Wednesday, October 05, 2011
  An Impression on PowerShell
This week I am writing a PowerCLI script to automate the vSphere managment job. Therefore I got some experience on PowerShell. Well, here is my comment on PS.

Basically the overall accessment is NEGATIVE.

Shell is something that glue the applications together. In the Unix world, if you follow some basic convetions, like dealing data with stdin, stdout, stderr, like treat everything as string, like emit exitcode 0 to stand for success, ..., then whatever language you use, whatever library your software depends on, it will be very easy for the end users to call your program with shells. And if other people also follow this convention, then it will be very easy for you to call their program, either in shell or in any program language. But in the PS world, this doesn't work.

In PS, everythig is .NET object. The arguments are, the return values are, even the API that MS provides to call the PS scripts are .NET stuff. So if you try to use a language that is not .NET aware, then you are screwed. In another word, PowerShell is not a shell for the operating system, it is a shell for .NET.

Aside from that, I have to admit MS has done a great job. PowerShell works pretty good by its own. The only problem is shell is not something that mean to play by its own.
 
Comments: Post a Comment

Subscribe to Post Comments [Atom]





<< Home

Archives
September 2006 / October 2006 / November 2006 / October 2011 / January 2012 / June 2013 / December 2013 / October 2014 / June 2015 /


Powered by Blogger

Subscribe to
Posts [Atom]