Slashdot Mirror


Microsoft PowerShell RC1

rst+ack writes "Microsoft has released RC1 version of PowerShell the .NET-based shell with perl-like syntax previously known as Monad or MSH. PowerShell (PS) has been covered a few times on Slashdot. Contrary to cmd.exe and Unix/Linux shells it operates on objects, not text when passing data between scripts and executables. Easy access to .NET classes allows users to create quite advanced solutions in short time. PS won't be shipped with Vista or Windows Server 2007 but it will debut with Exchange 12."

14 of 548 comments (clear)

  1. The relevant quote... by joe_bruin · · Score: 4, Insightful

    Ahem:

    Those who do not understand Unix are condemned to reinvent it, poorly.

  2. Re:Text by powerlord · · Score: 5, Insightful

    Well ... to take the position of "Devil's Advocate" for a minute, if they just extended bash to have C# scripting, then you'd have lots of people on this forum yelling how they are perverting the standard and that this is just aploy for them to embrace and extend the existing shell language.

    Look at it from MS's perspective:
    1) They know they need a shell like language to handle sys admin type functions.
    2) They've just put a lot of effort into .Net
    3) Most of the MS Admins out there believe VB is the tool of choice.

    Given those suppositions (feel free to argue about their reality, but remember that I'm discussing it from MS's viewpoint), a scripting language that fullfills (1), takes advantage of (2) and leverages (3) seems like a no brainer, even for them.

    Of course, considering that there are .Net bindings for Perl, that may be an even better choice for a scripting language.

    --
    This space for rent. All reasonable inquiries will be entertained at proprietors discretion.
  3. Strains the definition of "shell", kinda by Anonymous Coward · · Score: 4, Insightful

    So: You want a shell-like environment that lets you type in commands to operate on objects representing files, directories, etc.

    Great! Install python*, install the file packages, open the interactive interpreter... you're done.

    Why bother waiting for this MONAD thing? It looks like all MONAD offers over any other interactively interpreted programming language right now is that it is compatible with the C# object model. Which, y'know, on the one hand, the UNIX "glue" platforms (python, perl, ruby, kde, gtk) could totally benefit from a unified object model that would allow you to construct an object in a GTK+ application, pass it to a perl script, pipe it to a ruby app, etc. But, y'know, on the other hand, python on windows supports the CLR/C# object model as well... and it's available now.

    * Or ruby.

  4. Re:Text by shmlco · · Score: 4, Insightful

    "My problem is how blatantly incompatible they do everything."

    And his point was that, within the Windows environment, they ARE compatible, staying with their existing libraries, tools, and languages. Given that perspective, importing yet another language and toolset from Unix would be the incompatibility.

    Why does the entire world have to look like a scripting language from an OS designed four decades ago?

    --
    Any sect, cult, or religion will legislate its creed into law if it acquires the political power to do so.
  5. Re:Kinda reminds me of Access by cnettel · · Score: 4, Insightful

    Uh, it is a COMMAND SHELL? Of course it's text input based. They also claim that future graphical admin tools will render the equivalent commands in a text field, somewhat like what you describe. But this one certainly uses a text-based interface... The object-orientation is just about how commands interact with each other, especially when piping. Plain text piping between commands (note, not processes, the builtin commands are objects that will generally live in the same process as the shell itself) is a limited special case of this.

  6. Re:Text by PsychicX · · Score: 4, Insightful

    Prepare yourself, this may come as a shock...It supports text based communication. Amongst the vast array of .NET objects is the ever popular System.String, which is of course an object representing plain text. Pipe it to a program and guess what happens? That's right, the .NET part is stripped away and the plain old text is sent to the app.

    Microsoft gets it just fine. They get that *nix's text based communication is a crude and outdated way of doing things, and they provide a vastly more powerful interface, while keeping the old ones perfectly intact. I've been using MSH for several months now, and I'm amazed at how much more powerful it is than bash (which was previously a god in my eyes).

  7. I've tried PowerShell (formerly Monad) by eman1961 · · Score: 4, Insightful
    Shells are often used for managing systems and networks. I think that PowerShell will do an adequate job at this, although it seemed to be more complicated than necessary to me.

    Unix shell scripts are also incredibly good at manipulating text files, using awk, grep, sed, cut, etc. I tried to do such a task with PowerShell and found it wanting. I revered to Windows Services for Unix (basically the Korn shell).

    For those who don't know, a monad is a notion in functional programming languages that is a way to structure computations in terms of values and sequences of computations using those values. Monads allow the programmer to build computations using sequential building blocks, which can themselves be sequences of computations. This is not dissimilar to how PowerShell works, but really, I when manipulating text files, I don't want to be dealing with functional programming language abstractions.

  8. Re:.Net rocks by pandrijeczko · · Score: 3, Insightful
    There, I said it.

    BASH shell-scripting kicks ass. So do PERL, Python, the Korn Shell, PHP and C (and it's derivatives). I know enough about all of them to use one or more of them to do most of the tasks I need to do in the timescale I need to do them.

    I've never programmed anything in any Microsoft programming environment because I've never needed to - and it would take me far too long to learn their way of doing things from scratch rather than working with what I know.

    However, I know a few MS-based programmers who managed to develop the tools they need to in .NET or whatever it is they use - I'm sorry, I'm not informed enough about MS programming environments to voice any more opinions about it.

    Suffice it to say, they're happy and I'm happy.

    So everything is right with the world.

    End of story.

    --
    Gentoo Linux - another day, another USE flag.
  9. Re:i don't get it. by swissmonkey · · Score: 3, Insightful

    Given that 95% of the free tools available on Linux are available on Windows, me think that you've no idea what you're talking about.

  10. Re:Text by smittyoneeach · · Score: 4, Insightful
    crude and outdated

    Easily the oddest spelling of "simple and effective" I've ever seen.

    Or, to thug Rob http://landley.net/'s sig,

    "Never bet against the cheap plastic solution."

    Redmond's non-grasp of the wisdom of that observation is simply...titanic...
    --
    Get thee glass eyes, and, like a scurvy politician, seem to see things thou dost not.--King Lear
  11. Believe it or not.... by XMilkProject · · Score: 3, Insightful

    I know its hard to accept microsoft did something good, but as someone who has been using betas of this for months, I must say it is pretty darn slick.

    Think of how great your linux environment is, becuase you can easily chain together applications that pass textual data between each other... This is the same idea, except we can now pass complex objects and custom data types as well.

    To solve the problem of how to 'display' an object, each object type can have an xml file describing how to display it in a text environment.

    --
    Big ones, small ones, some as big as yer 'ead!
    Give 'em a twist, a flick o' the wrist...
  12. Re:Text by Billly+Gates · · Score: 3, Insightful

    "Why does the entire world have to look like a scripting language from an OS designed four decades ago?"

    Because computers input/output information just like they did decades ago. Unix is simple in the sense that everything can input and output data via text streams. Even the drivers in /dev and operating system internals in /proc can both recieve and output data via text from the shell!

    Windows is great for grandma, but in an enterprise server room or for a power user its insufficient.

    Why can't you manipulate the data inside the computer as easy as you could with unix? Why do I have to know x,y cordinate to click mouse buttons when running batch jobs for Windows programs?

    PowerShell is a great idea and its about damn time. Since Windows uses objects it makes sense to use them as arguments as well as text and the WMI which reminds me of sysctrl and /proc in unix.

    Its really all the same to me and just another implementation of the shell from unix.

  13. Obviously designed by programmers for programmers by RebornData · · Score: 5, Insightful

    Although I haven't played with it, I've read a bit about this shell, and there was something that bothered me about it, and I finally just put my finger on it: this thing was designed by programmers.

    I know that the line between "programmer" and "system administrator" is often blurry. And the line between "shell" and "interactive script interpreter" is as well. But when you start requiring people to understand concepts like objects (which may seem like old hat to a programmer), you're already presuming a relatively sophisticated understanding that an "average user" has no grasp of. And the .Net libraries are vast and complex... looking at some of the sample msh scripts, I understand how a windows programmer would think they were an amazingly powerful simplification, but damn there's a lot I have to know to get basic things done.

    Ye olde csh and sh are great because they provide a simple way to put programming logic around the set of operations users spend their entire day in and are already familiar with. The learning curve is very incremental: you can master the basic UNIX commands, and then start to add in variable subtitutions (!$ anyone?) and loops (foreach) and such as needed.

    In other words, the jump from basic UNIX user knowledge to simple scripting is very small, because the scripting is presented in *exactly* the same context and using the syntax the user does day-to-day work in. But as a competant windows admin who doesn't know VB and hasn't written a line of .Net code in my life, I see almost nothing familar when I read .msh scripts. It appears to require an entirely new body of knowledge to do simple things, and bears little or no relationship to the interfaces and paradigms I use day to day. Yes, I know those interfaces are graphical. Seems to me there's bound to be some way to do it (or would be if there were any logic or consistency to the organization of the everyday administative interfaces in Microsoft's products).

    Don't get me wrong... I understand that the goal of an intuitive scripting tool is in many ways at odds with providing a rich and powerful development environment that can complete with something like perl, but I had hoped there was something a little closer to "ground level" coming.

    -R

  14. Re:Text by squiggleslash · · Score: 3, Insightful
    Yeah, me too. I don't know, but the last few days, Slashdot seems to have attracted more dumbness than usual.

    What we have here is actually fascinating. It's an entirely new way of looking at the command line. It moves from the file based systems we've used since computing began, and instead looks at the high level programming and works within that framework. I think that's great, personally. If Microsoft could produce an operating system that eschews Win32/Win16/DOS et al completely and is pure .NET, with this as the shell, they would be producing something entirely radical and interesting at the same time, something that may well end up being several orders of magnitude more usable and useful than the Unix-based competition.

    I'd have appreciated a good discussion about it. As it is, I guess I'll have to wait until John Siracuse does an article for Ars Technica on the subject, and I'm not certain he will.

    --
    You are not alone. This is not normal. None of this is normal.