107 Comments
- whereisian, on 10/12/2007, -3/+55Not all diggers are fanboys. I use MS products everyday at work. Given, I use cygwin a lot to handle the heavylifting, but I'd be stupid if I didn't explore every reasonable possibility to improve my productivity (and marketability).
- Judahgabriel, on 10/12/2007, -2/+44How about trying it before bashing it (no pun intended)?
With the Unix tools, you're basically piping around text everywhere. Then having to parse/deserialize data out of those strings.
PowerShell takes a different approach: with the .NET framework, since everyone agrees on how objects look like in memory, PowerShell can actually pass around real objects instead of just text. It's quite powerful. - ozziegt, on 10/12/2007, -4/+29Believe it or not, most professionals use Windows either by choice or out of necessity. Tools like this are valuable to us.
- klumsy, on 10/12/2007, -4/+24to regurgitate a quote
"Comparing Monad to Bash or any of the UNIX shells is the difference between shooting a bullet and throwing it"
the unix shells pipe just plain text, and most of your time with tools like grep/sed/awk etc, is transforming that text from one form to another, and thats where alot of the mindpower goes to (rather than the task at hand), and inconsistencies in the text can really mess things up..
to really appreciate the "object piping" paradigm of powershell check out powershell analyzer at
http://www.powershellanalyzer.com - padewak, on 10/12/2007, -1/+16Release To Web
- Singee15, on 10/12/2007, -4/+18Read | Make-Comment /funny | Use-VerbNounSyntax | Make-CommandsReallyLong
- mddleNameIsEarl, on 10/12/2007, -3/+17> I thought you guys *hated* the command line
How would you come to that conclusion given the massive OSX and LINUX fandome on Digg? I'm asking an earnest question- I've always assumed that everyone here preferred the command-line to any other way of doing things. Either way, I'd welcome a more usable command-line on the windows platform. - sishgupta, on 10/12/2007, -5/+19I think the difference here is that Microsoft has put the GUI first with the command line being second in importance.
Traditionally in *nix the command line has been given preference. That is where you perceive this stigma.
Fortunately *nix is shifting into putting GUI and command line on equal importance. IMO anyway. - padewak, on 10/12/2007, -6/+19can unix shells do this?
$v = new-object -com "SAPI.spvoice"
$v.Speak("Want to Play a Game?")
try typing in "bad words" ;) - MioTheGreat, on 10/12/2007, -0/+12Ademan:
That's the beauty of a common language runtime.
Every .NET language knows exactly what a System.String, or System.Int32, or System.Windows.Form is..... - marcan, on 10/12/2007, -1/+12echo "I win." | festival --tts
edit: kikibun was faster, I was going to mention Python too with regard to the object-oriented stuff. The python shell is pretty much the same. - emblemparade, on 10/12/2007, -1/+12I think PowerShell is wonderful, and makes good use of a standard object system on Windows (.NET). I really wish Unix had something similar. I suggest y'all at least read the Getting Started guide to PowerShell before you comment! The concept is somewhat revolutionary.
To all those who decry a double standard: You're right that Windows-users were wrong to say that the command line was bad *in general*. But few real experts would ever say that. It's just that a different set of tools, GUI-based, were developed for Windows, making the command line not as overall useful as in Unix. It was bad for *Windows*, not bad in general. It just didn't make much sense to develop a parallel set of CLI tools. Now with standardization around .NET (rather than COM) across the operating system, both GUI and CLI manipulate the *same objects*. It finally makes sense for a Windows shell to that is actually useful for complete operating system administration.
Now that Java will be GPL'ed, I hope that Java will become the standard object system on Unix (and portable to Windows). Hopefully all the standard Unix operating system features would be wrapped in Java as objects (and standardized across operating systems, so they could work in Windows, BSD, Linux, OS X, etc.). There already is a great scripting language for Java (BeanShell), but it doesn't have a nice CLI, with support for piping, like PowerShell. Somebody should make this (or maybe it already exists, and I just don't know about). Right now, Windows is ahead of Unix in this, but I see no reason we free-software programmers can't compete and make something even better than PowerShell. For now, since I work with Windows, this release pleases me. - kikibun, on 10/12/2007, -2/+12A python shell probably could do something similar which incidentally can be used as your login shell if you wish.
- padewak, on 10/12/2007, -4/+14the haters in here just kill me!!! :P were your fathers the punch card die-hards when computers were taking off? why do you need to hate? it's moronic! if the world was full of you people, you'd be typing your inspirational notes on a giant slow computer.
stop hatin, get hackin, - MioTheGreat, on 10/12/2007, -2/+12Fine. Just keep piping text around...I for one have PSH on my to-learn list....
- ozziegt, on 10/12/2007, -1/+10Ademan: no it's not a double standard, it's different people having different needs, and different OSes having different weaknesses.
- DigitalDud, on 10/12/2007, -0/+8Right because Linux is the only OS that has CLI shells written for it...
- Urusai, on 10/12/2007, -2/+10$ cat /dev/random &> /dev/null
Cryptic three-letter commands are so much better. I just cataloged /dev/random! Now I'm going to target some archives. - Anand999, on 10/12/2007, -0/+7I wish they would have improved the actual interface of the shell rather than reusing the old "Command Prompt" interface with its annoying cut and paste behaviour. This would have been a good opportunity to give us a command prompt window that could be resized freely, cut and paste'd to with regular CTRL-C/CTRL-V, etc.
- Niten, on 10/12/2007, -0/+7This is perhaps the one feature that's making me consider going back to Windows for day-to-day activities. I hope that we'll see something similar come out of the free software community before too long.
And I'm glad they aren't calling it "Monad" any more... because then the GNU version would be called... - Jugalator, on 10/12/2007, -0/+6A sign you're a PowerShell newcomer is that you don't know its predefined shorthand aliases. PowerShell has e.g a "ls" alias for "get-children". The full names are just there to follow a standard and be better self explaining.
- DigitalDud, on 10/12/2007, -0/+6It's silly that they didn't get this in Vista, they missed RTM by a week.
- MioTheGreat, on 10/12/2007, -0/+6Eh, well, It's all .NET......So probably not.....
- Kickersny, on 10/12/2007, -4/+9I love the PowerShell. It's so bad.
- inactive, on 10/12/2007, -1/+6It takes a couple of seconds for the prompt to appear, which is a bit annoying.
- DiggLurker, on 10/12/2007, -2/+7To appreciate the difference between PowerShell and any other CLI, just watch a machine thrash as it runs out of memory. The startup memory usage of PowerShell is around 20 Megs. 20 Megs! The mem usage of normal CLIs? Around 20 bytes.
To be fair, a HelloWorld program in .net is also around 20 megs, so I'm not blaming the PowerShell developers. - DigitalDud, on 10/12/2007, -0/+5SCO Unix was written by Microsoft originally (it was called Xenix) before it was sold off to SCO. But what the hell does SCO Unix have to do with PowerShell?
- melfster, on 10/12/2007, -0/+5I use powershell all the time to do various task including server maintenance and managing my bank account. It heads and tails better then any scripting language on the windows platform and many even in the unix realm. The choices are cygwin, vbscript, batch files. And all them pale in comparison to powershell. It probable has the shortest hello world program in the history of computing. Here it is:
"Hello World" - astrosmash, on 10/12/2007, -0/+4Can PowerShell do this? (legitimate question)
cd ~/Desktop - DigitalDud, on 10/12/2007, -2/+6They're not going to change but in any case, it's less fragile than depending on the textual output of a command.
- MioTheGreat, on 10/12/2007, -0/+4Why? You'd be referencing the same assembly in both places, right? A standard .NET framework assembly, or something in the GAC, or an assembly setting somewhere....That wouldn't change.
- thushan, on 10/12/2007, -0/+3PS is awesome, i've been using it for quite some time now (think years) and its come along way since its humble beginnings on BetaPlace... here's a good intro to PS from Ars:
http://arstechnica.com/guides/other/msh.ars
Its a year old but its quite good in introducing wtf PS is... - blargman, on 10/12/2007, -0/+3scriptable AD administration.
/me drools
:D - thushan, on 10/12/2007, -1/+4@astrosmash
Yes it can:p
PS C:/Documents and Settings/Thushan Fernando> cd ~/Desktop
PS C:/Documents and Settings/Thushan Fernando/Desktop>
obviously the slashes are the other way...
PS cd /
^^ root drive.
type in ./ and press tab and it'll auto complete too (although with a full path)... - weizilla, on 10/12/2007, -0/+3it appeared with a navy blue background on my computer
- thushan, on 10/12/2007, -2/+5I've got the Powwwwaaaa...
Next thing you know we'll get acronyms from the other camps...
PS -> Pretty *****
PS -> Pretty Slow - weizilla, on 10/12/2007, -4/+6The blue background of the PowerShell reminds me of the blue screen of death
- Jugalator, on 10/12/2007, -1/+3I think it's the other way, that objects are more natural represenations -- "things" if you like. Trying to figure out how to parse information feels more like the job of computers, while trying to understand how things/objects work and can be interacted with feels more like the job of people. And background parsing of information stored in objects is exactly what happens in PowerShell, details that are hidden from the user, because they can be hidden due to the standardized object model.
- kroenecker, on 10/12/2007, -8/+10Looks like another round of painful memorization whereas any true geek already knows the unix command line in all its glory. Hate to say it, but Microsoft will always lag behind in this area.
- thushan, on 10/12/2007, -2/+4another day another loser on Digg with no real experience in a product they post comments on... atleast on /. people have *some* experience...
Sheeesh, the last 5 things i've commented on have all been from people that just havent tried something and yet they bash... - 0KonTroL0, on 10/12/2007, -0/+2OMG, it even has the 'ls' command....I have been typing that into windows for years.
- TrancePhreak, on 10/12/2007, -5/+7Ademan,
You are severely dim-witted with the internets. Incredibly easy google search yields:
http://www.dotnetpowered.com/languages.aspx - Escamillo, on 10/12/2007, -0/+2You guys miss the point.
The point of the example isn't simply to generate speech. It's to demonstrate that PowerShell can instantiate any programmable COM object (via .NET's com-interop), and call the object. SAPI.spvoice is the ProgID for the COM class in question.
Excel.Application is the progid for Excel's OLE Automation functionality.
One could use PowerShell to instantiate an Excel object via
$x = new-object -com "Excel.Application"
then call methods on it.
Obviously, PowerShell can instantiate .NET objects as well. - jkeen, on 10/12/2007, -1/+3So the scripting language is all fine and good but I would be happy if they would just release a term that would allow you to resize the window! And wrap selection text. cmd.exe makes me want to commit ritual suicide.
- hardwarehank, on 10/12/2007, -0/+2Time to break out the wine...mmm it better have 'ls'
hmm - it wont even install using wine. Lame. Oh well, guess I don't care anyway! CygWin lives on! - Escamillo, on 10/12/2007, -0/+2Just for your and everyone else's info, it does have 'ls'.
- numarc, on 10/12/2007, -0/+1I was just playing around with it. I found out powershell has man pages which I think is a nice touch.
- diggapleaze, on 10/12/2007, -0/+1The problem with powershell is that you need app support for your OS to make a shell useful. You can't just plop a shell out on customers and say "All done!".
3rd party software vendors need to *write* those command line utilities to compliment their GUI counterparts, and given the history and culture of Windows, that's just not going to happen. For example, you can run gimp in batch mode from the command line. I don't see Adobe doing this with photoshop or corel doing it with paint shop pro. Sorry! - hackerssidekick, on 10/12/2007, -1/+2LOL are you serious? It needs .NET, and unless wine magically grew .NET out of it's arse, it ain't gonna work
- Valleye, on 04/08/2008, -0/+1mode con cols=132 lines=80
cols and lines can be set independently -
Show 51 - 100 of 105 discussions



What is Digg?
The Digg Toolbar for Firefox lets you Digg, submit content, and keep track of Digg even when you're not on the Digg site. Download the official