Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Windows PowerShell in Action

Posted by samzenpus on Wed May 02, 2007 01:51 PM
from the read-all-about-it dept.
jlcopeland writes "For two decades I've hated the command prompt in DOS and Windows. Inconsistencies abound and everything is a special case. The fallback on a Microsoft box has been running a Unix shell under Cygwin or installing Microsoft's own Services for Unix (or its predecessor, Softway's Interix), or by scripting in Perl, but those only get you so far. Having co-written nine years worth of trade rag columns using mostly Perl as the implementation language for the samples, and thinking of every problem that comes across my desk as an excuse to write a little bit of scripting code, I've got some well-formed views about scripting languages and what works and what doesn't. That means I've been eagerly watching the development of PowerShell since it was called Monad. It's got the advantage of being a unified command-line interface and scripting language for Windows, even if it does have a dorky name." Read the rest of Jeffrey's review.
Windows PowerShell in Action
author Bruce Payette
pages 576
publisher Manning
rating 9
reviewer Jeffrey Copeland
ISBN 1932394907
summary Guide to PowerShell, the new Windows scripting language


Bruce Payette's Windows PowerShell in Action is a great overview of PowerShell, aimed at an audience that's got some experience with other scripting languages. Bruce's book is a big improvement over Andy Oakley's earlier book, Monad, which I had been using: it's more complete and it's up-to-date for the first release of PowerShell. It's got great (and sometimes amusing) examples, and feels like the Perl Camel book in flow. When I was reading it in the gym or someplace else away from the keyboard, I kept wanting to run back to the office to try something out. There are also useful "why it works this way" digressions, which provide a lot of context. Since Bruce was on the original development team, wrote most of the commandlets, and was responsible for much of the language design, those digressions are more authoratitive than the directors' commentary tracks on most DVDs.

In outline, the nine chapters in the first part of the book build up as you'd expect: overview and concepts, to data types, to operators, to regular expressions, to syntax, to functions, to interpreting errors. It covers that ground better than many language books that now litter my shelves. The explanations are clear, and the examples are almost all exactly on point. It took me a second reading to realize that my complaints about the regular expression sub-chapter wasn't about the chapter itself, but about some of the implementation decisions; that's an argument about style more than substance, and an observation about me, not about Bruce's writing or PowerShell. The first part of the book is the "mandatory reading," if you will, to get the language down and begin exploring on your own.

The second part is where the real applications are covered. That's the part that you especially want to read sitting next to the keyboard. As you'd expect, the example code is available from the publisher's web site to start you off — look for "Example Code" under "Resources." There's a very good discussion of text processing and how-to-handle XML, complete with some not-obvious warnings about traps to avoid. I've been working very carefully through the really good chapter on using GUIs with PowerShell, "Getting Fancy — .NET and WinForms," and my own proof of concept for that has been rebuilding an old C++ data entry application into a much simpler PowerShell script. As a nice side effect, Bruce's book (and the WinForms chapter in particular) provide a gentle overview to some concepts in the .NET framework, which I hadn't had an opportunity to delve into. The appendix on using PowerShell as a management application will be especially useful to system managers; that was one of the original PoweShell target audiences, and the language achieved that goal very well. The appendix on the language's grammar is really useful, and I keep flipping back to it to check on things.

After Oakley's Monad appeared, there was a long gap before the next PowerShell book appeared. Bruce's book looks to be the first of the post-release wave. If all it had going for it was the authoratative pedigree of the writer, it might be worth it, but it's also well-written, well-organized, and thorough, which I think makes it invaluable as both a learning tool and a reference.


You can purchase Windows PowerShell in Action from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
This discussion has been archived. No new comments can be posted.
Display Options Threshold:
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • Monad (Score:5, Funny)

    Named after the designer lost a testicle in a tragic chair throwing accident.
  • PowerShell (Score:2, Interesting)

    by El Lobo (994537) on Wednesday May 02 2007, @01:59PM (#18960853)
    is one of the nicest things that came out of Redmond. Ever. My only complain is that it is tight integrated to .NET, but OTOH I believe this is necesary to integrate the always nice C# to it, which is of course a plus.... You can't have the cake and eat it...
    • Re:PowerShell by Jeremiah Cornelius (Score:2) Wednesday May 02 2007, @02:55PM
    • PowerShell by IpalindromeI (Score:3) Thursday May 03 2007, @08:46AM
    • 1 reply beneath your current threshold.
  • At this rate... (Score:5, Insightful)

    by pnuema (523776) on Wednesday May 02 2007, @02:00PM (#18960875)
    ...in 20 years MS will invent UNIX.
    • Re:At this rate... (Score:4, Informative)

      by JPriest (547211) on Wednesday May 02 2007, @02:12PM (#18961013)
      (http://lp.org/)
      For those that didn't get it, his comment was a play on the famous:
      "Those who do not understand Unix are condemned to reinvent it, poorly"
      [ Parent ]
    • Re:At this rate... (Score:4, Informative)

      by Shawn is an Asshole (845769) on Wednesday May 02 2007, @02:13PM (#18961027)
      You mean again [wikipedia.org]?
      [ Parent ]
    • Re:At this rate... (Score:4, Informative)

      by PhrostyMcByte (589271) <phrosty@gmail.com> on Wednesday May 02 2007, @02:19PM (#18961111)
      (http://www.int64.org/)

      Wake me up when *nix gets an object-oriented (rather than text-oriented) shell. Because that is what makes Powershell so unique. Yes, it has plenty of builtin functions to make tasks easier, but the real advantage is that everything you pass between commands is an object.

      You don't have to worry about interpreting text output - you just access whatever data you want directly. Many of the commands are easily chainable into something like "ls | select fullname,length | sort name | format-list | out-printer".

      [ Parent ]
      • Re:At this rate... by jimstapleton (Score:2) Wednesday May 02 2007, @02:35PM
      • Re:At this rate... by Anonymous Coward (Score:2) Wednesday May 02 2007, @02:37PM
      • Re:At this rate... (Score:4, Funny)

        by nanosquid (1074949) on Wednesday May 02 2007, @02:59PM (#18961825)
        Wake me up when *nix gets an object-oriented (rather than text-oriented) shell.

        "Far out in the uncharted backwaters of the unfashionable end of the Western Spiral arm of the Galaxy lies a small unregarded yellow sun. Orbiting this at a distance of roughly ninety-eight million miles is an utterly insignificant little blue-green planet whose ape-descended life forms are so amazingly primitive that they still think digital watches are a pretty neat idea." (Douglas Adams)
        [ Parent ]
      • Re:At this rate... by Nutria (Score:2) Wednesday May 02 2007, @04:12PM
      • An object-oriented shell for Linux by MS-06FZ (Score:2) Wednesday May 02 2007, @04:43PM
      • Re:At this rate... by vux984 (Score:2) Wednesday May 02 2007, @05:00PM
        • 1 reply beneath your current threshold.
      • Groovy by SuperKendall (Score:2) Wednesday May 02 2007, @05:25PM
      • Re:At this rate... by ucblockhead (Score:2) Wednesday May 02 2007, @05:40PM
      • PowerShell isn't a Shell It's a scripting language by Anonymous Coward (Score:2) Wednesday May 02 2007, @06:26PM
        • Re:PowerShell isn't a Shell It's a scripting langu by stimpy77 (Score:1) Wednesday May 02 2007, @11:37PM
          • Actually, that is PowerShells biggest weakness as a integration shell.

            The idea benind the Unix toolset and shell is that everything is reduced to a common lingo -- a character stream. Each tool can then be "used as designed", or "misused". The classic example is the original Unix spell implementation. The tool designer promises to accept as wide an input range as possible, to output consistent streams, and not be verbose.

            The actual use (misuse) to the tool is left to the shell and user.

            The Object philosophy means that input to a tool MUST have certain methods available. If the correct methods are not implemented over the object, an adaptor tool must be used. Microsoft ensures that all PowerShell tools work together IN NORMAL USE. Obvious "misuse" is not (necessarily) supported.

            This makes common usage cases easy, but makes "outrageous" cases almost impossible (unless you reach for VC++ and write your own adaptors).

            As an example -- I do a lot of "performance analysis", which entails examination of log files, conversion to normalized scales, and running the results through GNU Plot to get images to paste into reports. There is almost always a need for custom shell scripting to do the log examination and reduction.

            Now, this IS possible in PowerShell, but only by treating it as a "Unix (gasp, how horrible!)" type shell.

            Since the exploration phase (and creative "misuse") is my primary area, PowerShell doesn't have much to offer me. But, for a developer living in the straight and narrow land of "how it should work", it is probably the next best thing to sliced bread.

            As to the "PowerShell" equivalent of the non-Microsoft world: I find that I still (occasionally) cook up SNOBOL scripts. When writing compilers for an old course, it was the ONLY programming language specifically not allowed for assignments (it made lexing, parsing and generation much too simple).
            [ Parent ]
        • Re:PowerShell isn't a Shell It's a scripting langu by jonadab (Score:1) Thursday May 03 2007, @05:20AM
        • 1 reply beneath your current threshold.
      • Re:At this rate... by CrankyOldBastard (Score:2) Wednesday May 02 2007, @07:04PM
      • try "ls -s | lpr" by sethawoolley (Score:1) Wednesday May 02 2007, @09:50PM
      • Re:At this rate... by jlarocco (Score:2) Wednesday May 02 2007, @10:48PM
      • Re:At this rate... by jhol13 (Score:1) Thursday May 03 2007, @01:32AM
      • Re:At this rate... by fuliginous (Score:1) Thursday May 03 2007, @06:42AM
      • Re:At this rate... by CarpetShark (Score:2) Thursday May 03 2007, @06:52AM
      • Re:At this rate... by Jarth (Score:1) Thursday May 03 2007, @09:49AM
      • Re:At this rate... by PhrostyMcByte (Score:2) Wednesday May 02 2007, @02:53PM
        • Re:At this rate... by dAzED1 (Score:1) Wednesday May 02 2007, @05:28PM
        • Re:At this rate... by that this is not und (Score:1) Wednesday May 02 2007, @09:42PM
        • Re:At this rate... by ray-auch (Score:2) Wednesday May 02 2007, @03:44PM
        • Re:At this rate... by Tanktalus (Score:3) Wednesday May 02 2007, @04:22PM
          • Re:At this rate... (Score:4, Informative)

            by Thundersnatch (671481) on Wednesday May 02 2007, @04:38PM (#18963639)

            The FOR command [microsoft.com] in the "legacy" Windows shell is pretty powerful, too. It even has horrible syntax, just like its UNIX fathers.

            Yes, the legacy Windows shell sucks, but not as badly as most people assume. The NT shell can do a lot of stuff that most people don't even think to try. Great gobs of functionality have been added over the years, starting with Windows NT 3.5. And contrary to what many slashdotters think, the legacy shell on Windows NT-derived systems is not DOS, nor is it 16-bit. CMD.EXE is just another 32-bit or 64-bit process running on the NT kernel.

            [ Parent ]
          • Re:At this rate... by dwater (Score:2) Wednesday May 02 2007, @05:27PM
        • 1 reply beneath your current threshold.
      • Re:At this rate... by Jugalator (Score:2) Wednesday May 02 2007, @04:55PM
      • Re:At this rate... by renoX (Score:3) Wednesday May 02 2007, @04:58PM
      • Re:At this rate... by fitten (Score:1) Thursday May 03 2007, @09:05AM
      • 2 replies beneath your current threshold.
    • Re:At this rate... by morgan_greywolf (Score:2) Wednesday May 02 2007, @02:21PM
    • Re:At this rate... by misleb (Score:2) Wednesday May 02 2007, @02:31PM
      • Re:At this rate... (Score:5, Interesting)

        by archen (447353) on Wednesday May 02 2007, @02:54PM (#18961733)
        There's actually a lot of other cool things about it as well. I've been using Jscript to do stuff since Win2k (screw that VBscript garbage) but there are obvious limitations at the scripting level, but in the end you're always stuck in cmd.exe

        I was skeptical when I first heard about Monad. I mean it seemed obvious to me that Microsoft just didn't get the point of a "shell" which is supposed to be simple. With a pending install of Exchange 2007, the power shell is required so I figured I'd start to dig into it. I have to say I'm rather impressed.

        First of all, it is actually simple. Not only that, but the syntax is EXTREMELY CONSISTENT. And honestly I cannot stress that enough, because if you think you know part of a command you can usually figure out the verb/noun syntax to use. It also allows shortcut versions of commands so you don't have to type the entire "wordy" version of the command. Aliases are supported too. Another cool feature? You can navigate the registry like the rest of the file heirarchy.

        I'm a big fan of bash, but I must admit that at times it gets old shuffling stuff with awk and cut and so forth. By getting objects you can take what you want out of it, and not worry about the biggest Unix terror - the text output changing. If whatever you're trying to do doesn't support .net objects, you can still pipe text.

        Overall it's pretty awesome technology and I must give MS credit where it's due. Not that I'll be switching any of my FreeBSD servers to Windows because of it, but it makes windows administration orders of magnitude better. Too bad it got dumped in Vista. I've heard it will be included in service pack 1 though.
        [ Parent ]
      • Re:At this rate... by cduffy (Score:3) Wednesday May 02 2007, @03:00PM
      • Passing objects, huh? by aix tom (Score:1) Wednesday May 02 2007, @03:15PM
    • Re:At this rate... by fm6 (Score:2) Wednesday May 02 2007, @02:46PM
    • Re:At this rate... by The Lord of Chaos (Score:1) Wednesday May 02 2007, @03:05PM
    • Re:At this rate... by Bacon Bits (Score:2) Wednesday May 02 2007, @04:08PM
    • Re:At this rate... by JayClements (Score:1) Thursday May 03 2007, @08:18AM
    • 1 reply beneath your current threshold.
  • Don't knock it until you try it (Score:4, Interesting)

    by PhrostyMcByte (589271) <phrosty@gmail.com> on Wednesday May 02 2007, @02:03PM (#18960913)
    (http://www.int64.org/)

    Powershell is very powerful. Much more so than cmd.exe. I don't have significant enough experience with bash to compare the two but I would not be surprised to learn Powershell equals if not beats bash at the shell game. I wouldn't say it is ready to replace any of the scripting languages just yet.

    I have been using it for a while now and the single (semi-major) problem I can find is memory usage. It is a hog at best, and at worst when you are using it semi-heavily it can easily chew up 1GB of memory. That's even with giving the GC something to work with, ie unsetting $vars when you are done with their data.

  • Monads are windowless, get it? (Score:5, Interesting)

    by Brunellus (875635) on Wednesday May 02 2007, @02:05PM (#18960933)
    (http://ouij.livejournal.com/)

    I wish they'd kept "monad" as the name. It was a deft tip of the hat to Leibniz's Monadologie, which held that monads were the windowless metaphysical atoms of perception itself.

  • Well, *that's* unique (Score:5, Funny)

    by Angst Badger (8636) on Wednesday May 02 2007, @02:06PM (#18960951)
    Inconsistencies abound and everything is a special case.

    You should switch to bash and the GNU tools.

    Oh, wait.
  • by Anonymous Coward on Wednesday May 02 2007, @02:11PM (#18961007)
    Now all we need is for Sun to develop a Solaris-only shell, Apple to develop a Mac-only shell, and RedHat to develop a Linux-only shell. I hate re-using code because it forces me to solve new problems every day. I'd rather create new value on Mondays only, and then spend the rest of the week re-doing the same work on my other platforms. It gives my mind a chance to rest, and I can drink heavily mid-week and still be able to do my job.

    I sure hope they charge extra for it, make it a resource hog, lock out third-pary extensions, and then discontinue it as soon as I'm dependant on it. I really liked the 1980s and look forward to reliving them.
  • Great Review (Score:5, Interesting)

    by water-and-sewer (612923) on Wednesday May 02 2007, @02:14PM (#18961047)
    (http://www.therandymon.com/)
    I don't use Monad (:s/M/G/g) or intend to, so I don't care much about the book. But what a great review. We get a lot of amateur reviews around here, but this one was particularly well written, clear, and informative. Nice job, homie.
  • What is wrong with Cygwin? (Score:2, Interesting)

    by raphae (754310) on Wednesday May 02 2007, @02:20PM (#18961127)

    a Unix shell under Cygwin or [...] but those only get you so far



    What is wrong with Cygwin? How can he bash Cygwin (sorry, no pun intended) without even bothering to say anything about it?
  • Some clever spacing (Score:5, Funny)

    by Hoplite3 (671379) on Wednesday May 02 2007, @02:30PM (#18961265)
    Windows Powers Hell ?

    I guess I always suspected it was true, but the beastie mascot of BSD made me wonder if there wasn't room for a little UNIX in Hades too.
  • by 3m_w018 (1002627) on Wednesday May 02 2007, @02:31PM (#18961275)
    (http://www.dashmaps.com/)
    It's slower than cold molasses up a hill.

    It takes a few seconds for the prompt to appear, and if I run a "dir" operation with both cmd.exe and PS in a directory with hundreds of files, cmd.exe will beat it in seconds.

    I'm not running a slow machine(core duo 2, 1GB of RAM). Is there something that needs to be configured to make it suck less?
  • What about MKS? (Score:3, Informative)

    by markdj (691222) on Wednesday May 02 2007, @02:36PM (#18961331)
    You forgot MKS toolkit which has most if not all of the standard UNIX utilities along with vi, bash, ksh, sh, awk, sed, etc. What more could you want?
  • harry@satan:~$ apt-cache search powershell
    powershell - powerful terminal emulator for GNOME
  • I've been using this command-line since 1988, back when it was NDOS.COM, and was much better than COMMAND.COM. Later, they broke off from Norton and became JPSoft. When 2K came out, they changed the shell's name from 4DOS to 4NT.

    So, I've been using NDOS/4NT for almost 20 years now. Why would I bother to learn PowerShell when I already have a shell? And I already have cygwin, so I can use unix tools at the command-line just fine?

    It's sad that more people aren't using this great tool.

    • Ahhh, 4DOS by DragonHawk (Score:2) Wednesday May 02 2007, @09:37PM
  • A quick intro to Monad (Score:4, Interesting)

    by sootman (158191) on Wednesday May 02 2007, @03:04PM (#18961907)
    (Last Journal: Thursday July 12, @12:30PM)
    For those who haven never seen Monad in action and are quick to bash (ha! get it?) Microsoft's new shell, take a look at these two [msdn.com] videos [msdn.com]. You'll see that it's much more than just bash on Win32. In fact, if it ever catches on, it'll be Unix's turn to play catch-up, because some parts of it are pretty damn amazing. (Note that those are from 2005, but AFAIK, there haven't been substantial changes.)

    The whole point of Monad is that it's not just text, it's objects. So, unlike Unix, where you work with a command and then filter its output (which is just text), the output of Monad, while looking like text, is actually kind of like pointers back to the real thing, so instead of just doing a Unix-style command | filter | filter, you can say "OK, run this command, now of the things it output, go back and tell me this and this about them." Like, "Of these things that are running, tell me which five are using the most CPU time, then tell me the version of each, and how much memory they're using."

    PS: "...even if it does have a dorky name"--which name were you referring to: the one that sounds like 'testicle' or the one that makes me think of the Lottery? :-)
  • by Evilged (1096629) on Wednesday May 02 2007, @03:11PM (#18962035)
    I have to manage a Windows domain of a 1000+ users and Powershell (yes crap name) allows me to do stuff that you used to only easily do with expensive third party stuff quickly in a few lines.
    The only other choice to do something similar on Windows is VB script which I find painful at best. It may not be the best Shell ever but at the moment its the best Windows integrated shell with access to .Net, WMI etc. and it beats Active Directory administration through a GUI any day.
    The book is great by the way, and his blog has loads of useful tips too.
    Anybody who is actually going to try it, will find the powershell community extension very useful. G
  • by Brit_in_the_USA (936704) on Wednesday May 02 2007, @03:16PM (#18962159)
    I hope this is not a dupe - I certainly was not aware....
    ...PowerShell is avlaibel for MS OS's older than Vista too:

    http://www.microsoft.com/windowsserver2003/technol ogies/management/powershell/download.mspx [microsoft.com]
    • 1 reply beneath your current threshold.
  • Copy and Paste (Score:2)

    by tobiasly (524456) on Wednesday May 02 2007, @03:21PM (#18962245)
    (http://www.tobiasly.com/)
    The thing that absolutely drives me nuts about both the Windows Command Prompt and Power Shell is its inability to copy a multiline string to the clipboard as a single line. For example, when the output of a command wraps from one line to the next, trying to copy that output will leave that embedded newline intact.

    Even worse, all copy operations work on a rectangular block of text, not a true start and end point as in a word processor. It makes it useless for copying the output of a program (whether it be a long filename, URL, stack trace, etc.) and pasting it somewhere else.

    When PowerShell came out, that was the first thing I tried, thinking for certain they would have fixed that. But they didn't. At that point I closed PowerShell and haven't used it since; I just stick with Cygwin or use Putty to SSH into a *nix box.
  • Prompt (Score:1)

    by PenGun (794213) on Wednesday May 02 2007, @03:25PM (#18962321)
    (http://carnagepro.com/)
    Can the prompt be the present time ... like my bash prompt?
    • Re:Prompt by Evilged (Score:2) Wednesday May 02 2007, @03:39PM
      • Re:Prompt by PenGun (Score:1) Wednesday May 02 2007, @04:30PM
        • Re:Prompt by Evilged (Score:1) Wednesday May 02 2007, @05:08PM
          • Re:Prompt by PenGun (Score:1) Wednesday May 02 2007, @06:01PM
            • Re:Prompt by Evilged (Score:1) Thursday May 03 2007, @04:12AM
  • WSH since 1997? (Score:2)

    by timjdot (638909) * on Wednesday May 02 2007, @03:55PM (#18962853)
    (http://www.serviza.com/)

    Windows Scripting Host (WSH) was released in like what? 1997? How is PowerShell any different than what you could do with WSH?
  • Bean Shell (Score:4, Interesting)

    by hachete (473378) on Wednesday May 02 2007, @04:18PM (#18963271)
    (http://www.badstep.net/ | Last Journal: Tuesday December 30 2003, @06:04AM)
    The Bean Shell. That's it. That's what Gonad is trying to copy. Though I forget - who's trying to copy who this week?

    Same problems too as well - memory consumption up the wazoo and slow as hell. Every time you've got to do a "pipe" you need to look at miles and miles of API.
  • by Qbertino (265505) on Wednesday May 02 2007, @04:32PM (#18963523)
    Just reading the comments here emphasises what I think of todays state of IT: We are still in the steam age of computing. Wether what moves around in a CLI is streams of text or a bunch of objects doesn't really make a difference. Just today I was trying to get SuSE Linus to install mc over a remote ssh connection. [Sidenote to Windows-only people: Doing this sort of thing in the MS world still is factually impossible]
    Anyway I was there in SuSE CLI and fired up YaST 2 (MS speak: the SuSE Installer) in it's CLI version. And here it comes:
    1) The characters wouldn't render correctly because the charset wasn't the right one.
    2) I was logged in from OS X / Terminal and the keycodes from my Mac KB wouldn't reach out to remote PC SuSE with [fill in charset 'XXXX-uft8b32-centralusbekistany-ZZZZ' here] aktivated.
    3) A pure real literal high-quality unobscured 'Ctrl-C' tranferrend via the context-menue option of OS X term (smart people these apple guys) didn't work either due to SuSE/PC/Whatnot keycode/charset/whatnot issues

    I had to ask our Windows Admin next to me to log in via putty and to the install (duh.). Given, it was SuSE, it was 9.3 and it was totally bugged up. YaST 2 CLI sux and is no where near Debian apt or OS X Fink. [x86 Debian and OS X play ball very nicely btw. Great server/workstation combo]

    But as long as I have to spend 40 hours fixing character renderings of a web application the only possible way that isn't even mandatory according to w3c standards adn evaluation and as long as the VI is the only way to be halfway safe to work over remote ssh and then only if im using the right keyboard and have the right charset (of a set of something around 60) ... as long as we're actually still working this way and this way is the most effective possible (as mentioned earlyer, we are way out of Windows league here) - we are still in the early steam age of computing. I predict it will take another 20 for this crap to finally iron out and everyone is using Bash or ZShell, keycodes and charcodes and glyphs are all in line and everyone not using the standard gets fried by pure marketforce. Sort of like the automobile industry today. ... But as I said: IT still is in the steam age.
  • by Locutus (9039) on Wednesday May 02 2007, @04:54PM (#18963925)
    Why would this author not have put Windows in a VM on Linux years ago if it was that big of a deal? Sorry but that bit just sounded kinda strange but my guess it was all just to make it sound like he's a real programmer or something.

    LoB
     
  • Wow! (Score:1, Troll)

    by PhotoGuy (189467) on Wednesday May 02 2007, @05:07PM (#18964151)
    (http://slashdot.org/)
    Wow, so you're telling me that Vista not only has UAP (finally, an OS with fancy user permissions!), but also has a programmable shell!?!?!? WOW, I had no idea OS's had progressed so far. Wholy crap, sign me up!!!
    • Re:Wow! by Mia'cova (Score:2) Wednesday May 02 2007, @07:49PM
  • by MobyDisk (75490) on Wednesday May 02 2007, @06:44PM (#18965203)
    (http://www.mobydisk.com/)
    It woudl be nice if *nix commands offered standardized extensible input and output formats like what Powershell has with objects. Sysadmins write commands using pipes to connect processes together, then later when you upgrade the OS your scripts break because the format varies ever-so-slightly. Worse yet, without a standard error reporting mechanism nothing ever knows. The script can't tell "file1.txt 12345" from "error! 12345" so it just carries on with invalid data until somebody notices.
  • by Myria (562655) on Wednesday May 02 2007, @06:49PM (#18965257)
    I remember reading once that Monad requires all scripts to be signed by a key countersigned by a certificate authority. Is that still true? If so, Monad is completely useless.
  • effing objects (Score:2)

    by Tsiangkun (746511) on Wednesday May 02 2007, @07:54PM (#18965975)
    (http://www.soundclick.com/tsiangkun)
    Is there going to be an IDE for writing shell scripts now ?

    I for one like working with text, and could care less about wading through tons of API documentation for these wonderful pipable objects.

    I have a myriad of OO and procedural languages for solving problems. My shell is the duct tape that holds them all together.

  • by Bigon (881193) on Wednesday May 02 2007, @08:11PM (#18966153)
    you can use 'ls' in a shell!!!
    • 1 reply beneath your current threshold.
  • Documentation (Score:2)

    by atomicstrawberry (955148) on Wednesday May 02 2007, @08:12PM (#18966157)
    I tried running Powershell a while back after getting frustrated at how awful cmd.exe's scripting capabilities are in comparison to my usual environment (bash, in linux). It wasn't terrible, but I can't ever see it taking off. There's practically zero useful documentation to explain how to use the shell beyond the very basics. It also doesn't seem possible to get it to run older batch files (I have a few of them that are necessary for my job and I don't have time to rewrite them all), and I couldn't figure out how to set environment variables either. I'm s