Microsoft PowerShell RC1 548
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."
can you? (Score:4, Funny)
Re:can you? (Score:4, Informative)
Re:can you? (Score:3, Interesting)
To resume complaining about Microsoft, though -- perhaps they could include a help button or any other visual cue that there's more to the app than a window with a cursor? It doesn't have to be Clippy ("It looks like you're trying to use Unix commands out of habit!") but I wouldn't mind having the cat scratc
Re:can you? (Score:5, Informative)
Re:can you? (Score:2)
I actually like the sequential tab completion, at least when there are only a few options. My ideal would probably be the MS-style completion for a configurable number of choices, at which point it spills over to bash's tab-*beep*-type-tab-*beep*-type-tab behavior.
Re:can you? (Score:2)
Holy crap... Since I resigned myself to using XP at work, I have so wanted a way to get the command prompt to use the Win2k style of cutting and pasting.
And you've just provided it.
Bless you! If I had mod points, and you hadn't already hit "5"... Well, you get the idea.
Re:can you? (Score:3, Funny)
Re:can you? (Score:3, Insightful)
Increasing the buffer size still doesn't let you resize the window horizontally, although it does allow you to increase the size vertically. It's a fixed width window, which really stinks.
Re:can you? (Score:3, Informative)
True, but you can change the maximum window width as well. Change the buffer and window widths from 80 chars to something like 120 to get a wider window. You can resize it to make it smaller, though you get scrollbars along the bottom of the window.
Not quite as nice as a *term window, but then Windows doesn't revolve around a terminal quite like *nix does.
Re:can you? (Score:5, Funny)
It certainly isn't what it should be... But, if you go to properties, and go to the layout tab, then change *both* the horizontal buffer size and the the horizontal window size, it works fine. It's just buried on the third tab of the not-very-obvious properties window -- don't confuse it with the buffer size setting on the first tab, as this is unrelated.
Now, why in the name of god they don't just let you resize it with the mouse like every other Windows window, and every other terminal emulator like kterm/gterm... I have no god damned idea. But, it is there, pointlessly buried. Third tab of the non-obvious properties window, where you have to change two different settings by hand. People keep asking me why I don't prefer Windows. They keep insisting, "Isn't Windows easier to use?" Egad.
Quick resize (Score:4, Informative)
Re:can you? (Score:5, Informative)
enter a few commands
then press F7 for surprising results
Re:can you? (Score:3, Funny)
You can get similair functionality in Linux by installing FlightGear...
Re:can you? (Score:3, Informative)
One nifty feature though, is that you no longer have to type the drive letter first to change to a directory on it.
In other words cyou can be in "c:\foo", and just type "cd d:\bar". You used to have to type "d:" and then "cd d:\bar".
Re:can you? (Score:3, Informative)
You can do that in cmd.exe too--
C:\Foo> cd
D:\Bar>
Re:can you? (Score:3, Funny)
Re:can you? (Score:2)
Re:can you? (Score:2)
You *can* copy and paste into cmd.exe. You right-click on the window and hit "paste."
Seriously, Linux users are supposed to be smart. ^_^
Re:can you? (Score:3, Funny)
Beats me why this should offer any benefit, but you can do it in THREE DEEE!
Re:can you? (Score:3, Interesting)
but hey, it's at least it's the first three-dee virus platform
Text (Score:4, Funny)
Why would you want to use an arbitrary, difficult to debug format like text when you could use
-Peter
Re:Text (Score:4, Funny)
Currently reading: CLASH - Common Lisp As SHell.
Objects? We don't need no stinkin' objects!
Re:Text (Score:2, Insightful)
Maybe so we don't have to parse and re-parse and re-re-re-parse the damn text every time. To say nothing of data that's nested. Of course we could all just use XML and YAML, we just have to rewrite every app to serialize and unserialize these grotesque formats.
Frankly I don't see the need to justify the addition of functionality for people who do nothing but bitch about how real problems don't
Re:Text (Score:3, Insightful)
Do you understand that the shell is suited for system administrators and not for programmers ?
Well, programmers can use it too, that's a powerful feature, not a drawback.
System admin don't need to parse and reparse and re-re-reparse anything.
No BS abo
Re:Text (Score:3, Insightful)
I do a lot of bash and perl scripting and am very good at it. The freedom in transformation that perl gives over plain text is huge.
Extending that data to objects opens up a whole new world of capability in the same way, say, perl and regular expressions opened up whole new capability for munging data. Mmmm... munging objects.
Absolutely, totally cool. Don't be a Microsoft hater just b
Comment removed (Score:4, Insightful)
Re:Text (Score:5, Insightful)
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
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
Re:Text (Score:3)
Like I can use BSD or Linux or MacOS and for the most part the shell is compatible [they all have their own takes on shell].
Then you move to Windows and nothing is similar. They purposefully [for instance] use the wrong direction on the slashes to make things incompatible. That's the level of stupidity they stoop to.
There is no reason why they couldn't embed C# support [or generically
Re:Text (Score:3, Informative)
Additionally, I've used MKS Toolkit and other such add-on utilities to get completely compatable scripting, shells, and utilities across Unix, WinNT/2k/XP, etc.
Re:Text (Score:3, Informative)
But I also think VMS and Microsoft have more of a connection in developer-land than UNIX and Microsoft, and it does sometimes show.
Re:Text (Score:2)
Re:Text (Score:5, Insightful)
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?
Re:Text (Score:4, Insightful)
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
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
Its really all the same to me and just another implementation of the shell from unix.
Re:Text (Score:3, Informative)
Also, "/proc" is rapidly being deprecated. Heck, on the *BSDs, it is mostly now a totally optional feature. MacOSX doesn't even have "/proc" at all. Solaris still has it, but I wonder how long. (since there are system/kernel calls that utilities can make to get at all that information anyways, and I've heard there are
Why?!? (Score:5, Funny)
Wheels -- thousands of years old. Still work.
Fire -- hundres of thousands of years under human control -- still works.
And you -- still typing after all these years, over a hundred now, since the invention of the keyboard. Still using fonts, for pete's sake, on graphical displays, invented before UNIX, along with mice, still using silicon (60 years old) and rust (thousands of years old) and electricity, back before Mr Franklin's experiments with kites 250 years ago, still using bits for storage as characters, processed by computer instructions, over 50 years old. Why haven't you graduated to something modern?
Re:Text (Score:5, Interesting)
When MS-DOS was first written, there was no such thing as directories. Everything lived in the root, and there was no need for path names or path separators. It quickly became necessary to pass arguments to commands, and the natural way to do this was to distinguish them from paramters by pre-pending a character. MS chose to use
Time passed, and directories were invented. People started to use / as a path separator, in similar fashion to how references are built up - eg major part/minor part/whatever/etc, say "57b/6". MS obviously had to support directory trees, but didn't want to break backward compatibility (something they are loathe to do to this day), and so could not use
Alternatively, perhaps you're right, and they're petty and stupid enough to shoot themselves in the foot by making themselves incompatible with every competing product at a time when they had little or no compelling advantage.
Incidentally, try using / in a path in the address bar of Windows Explorer in a modern Windows (eg >= 2k). You might be surprised.
There is no reason why they couldn't embed C# support [or generically
What familiar? This isn't aimed at Unix admins, this is aimed at Windows admins, and most of them are going to be much more familiar with cmd.exe than with bash, or ksh, or ash, or tsh, zsh or any other of the myriad, subtly-incompatible *nix shells.
Re:Text (Score:3, Interesting)
Re:Text (Score:3, Insightful)
You say that but the only reason people like me like the "oss way" is that it's just that, open. If Larry decides to take a dive off the sanity train I can stick with the current copy of Perl. I have the right to use the code and furthermore distribute it.
I
Re:Text (Score:3, Insightful)
That's my point exactly though. Larry is free to turn Perl into whatever he wants. The code is freely accessible. I can keep giving Perl 5.xx to my customers and not care what 6.xx does.
Furthermore, if I'm so inclined [I'm not... but] I can fix and add to Perl 5.xx if Larry [and the others] decide to abandon it.
Whereas in the MSFT world you're basically fucked. Reported bugs [especially in IE] often go unattended for long periods of time [CWS virus anyone?] and newer versions are oft
Re:Text (Score:2)
They could *gasp* go prepare a draft for an extension to the standard and forfeit patent rights to related tech etc, and then formally propose an extension to the standard. Standards can be changed and extended you kno
Re:Text (Score:5, Insightful)
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).
Re:Text (Score:4, Insightful)
Easily the oddest spelling of "simple and effective" I've ever seen.
Or, to thug Rob http://landley.net/ [landley.net]'s sig,
"Never bet against the cheap plastic solution."
Redmond's non-grasp of the wisdom of that observation is simply...titanic...
Re:Text (Score:4, Funny)
"Amongst the vast array of
Nobody expects the command line!
Re:Text (Score:2)
Bash is extensible. You can easily embedded perl or other scripting languages in it. So if you don't like it's language you can mix and match.
I'm certain tcsh, ksh and the others have similar functionality.
Tom
Re:Text (Score:3, Insightful)
Re:Text (Score:3, Informative)
Here are some of the commands available:
So please check first before asuming anything
The relevant quote... (Score:4, Insightful)
Those who do not understand Unix are condemned to reinvent it, poorly.
Re:The relevant quote... (Score:5, Funny)
Linux is posix (Score:3, Insightful)
As for monad/powershell... it's the same story. Instead of having the shell of your choice (bash,csh,zsh,python...) with the programming language of your choice (bash,perl,python,C++...) they're still trying to force a vision on people
Re:Linux is posix (Score:3, Informative)
If you are going to claim that the Linux implementation makes it compliant than you should extend a similar courtesy to Microsoft's POSIX implementations.
Both have some, but no where near all.
Re:The relevant quote... (Score:3, Interesting)
Microsoft did Unix back in the 80s, and used it internally well into the 90s.
I would trust Microsoft's Unix knowledge just as well as I'd trust Apple's unix knowledge in the late 90s --- and look at the runaway success that OS X has been.
Don't judge a book by its cover. I'm not the biggest fan of Microsoft, but I'll concede that they've had a number of fantastic successes to their name. Powershell sounds quite interesting and innovative from what I hear -- actually one of the
Re:The relevant quote... (Score:5, Interesting)
The big thing is- who wants to wait 4-5 seconds for their shell to launch? And this is in 64-bit with 2 gigs of RAM and MSH ngened (ngen == cache of pre-JITed
It's an admirable attempt but I think it's far too slow for normal use- until they fix that I can't imagine it picking up much of a following.
Re:The relevant quote... (Score:3, Informative)
Jeffrey Snover, chief architect, acknowledges this on the old blog [msdn.com]
(the old bl
Re:The relevant quote... (Score:2)
How long will it take for them to create a CPAN? (Score:2)
Re:How long will it take for them to create a CPAN (Score:4, Informative)
Re:How long will it take for them to create a CPAN (Score:5, Funny)
but but but (Score:2)
Re:but but but (Score:5, Informative)
- Oisin
Re:but but but (Score:2)
I'm willing to give MS the benefit of the doubt here. They may have come up with a good idea (then again it could be terrible). I don't know if I'll ever use it (I banished Windows), but if I do I'll rate it without bias.
Should I give my, I'm not an MS shill disclaimer now?
Is that like PowerGlove? (Score:5, Funny)
i don't get it. (Score:5, Interesting)
Re:i don't get it. (Score:3, Insightful)
Furthermore, what I do with shell is, for example: call a program, catch the output, read in the 3rd column, print that combined some command to the shell again. This is easy when you work with text and you don't have to worry about the variable type of the 3rd column (be it a number,
Re:i don't get it. (Score:3, Informative)
This exact scenario is actually simpler in Powershell - check this blog entry
http://blogs.msdn.com/powershell/archive/20 [msdn.com]
Re:i don't get it. (Score:3, Insightful)
Everything.
Except IE.
Want file conversion software? Pay for it. Want interface software? Pay for it? Want ssh? Pay for it. Want to do something that is taken for granted in *nix systems and can be done by three different programs running on the system by default? Pay for it.
Let's face it, you can't get the functionality of pico on a windows
Re:i don't get it. (Score:3, Funny)
I guarantee you, I've paid and paid for IE.
And all I got was this lousy CSS support. *sigh*
Re:i don't get it. (Score:4, Insightful)
On XBox Power platform? Passing Text Arrays? (Score:5, Interesting)
More like WMIScript (Score:5, Interesting)
Guys, next time, think about making it do something before you put out a release candidate.
Re:More like WMIScript (Score:5, Informative)
get-wmiobject Win32_UTCTime
WMI is one of the reasons we needed an object-based shell - it presents Window management information as a collection of objects. Writing code to render those objects to strings and then parse them back into objects is not realistic. We needed a shell that could deal with them directly.
Bruce Payette
PowerShell Technical Lead
Microsoft
Re:More like WMIScript (Score:5, Informative)
As I understand it, the difference between PowerShell and your typical Unix shell is that the Unix OS is built around the shell and PowerShell is built around the OS.
As text exchange of data is the de facto way of piping data between applications in a unix system and the shell has long been the de facto way of interacting with the OS and the applications running on it most applications and the OS itself have been built to interact very well with the shell.
However, on windows, which hasn't been built around the shell and which presents objects as the standard way to share data, they had the choice of either
a: adding functionality to all applications in order to allow it to interact in a text-based way with cmd.exe, which is rediculous because of the vast number of applications already out.
OR
b: writing a shell built to integrate with the OS and the objects it uses to exchange data, which they did with PowerShell.
Basically, this seems a sound design decision which probably has it drawbacks (necessity for data type handling & such ) but seems like a good match for winOS'es. An object orientated shell would probably not work very well with a unix OS, if only for the fact that (most?) unixes are written in C, which does not do objects at all.
Seems like a good solution for windows systems, too bad it isn't (won't be?) included with the OS by default. It might make windows a better place to live for all us CLI types, and it can't possibly be worse than cmd.exe, can it?
Re:More like WMIScript (Score:3, Interesting)
The Unix shell has no knowledge of what the other executables or scripts that you execute with it do and the OS doesn't require text to be passed between programs. The unix philosophy is that everything is a stream of bytes and programs can do with them whatever they want.
The advantage of having a program output text rather than so
Re:More like WMIScript (Score:3, Interesting)
IIRC there is a text serializer which you can use with if all you want is basic text output. so ls | totext | wc would do the same as ls |wc on unix. And if they did things right (didn't tried monad myself, just read some articles about it), they'd have the "commands" have default input and ouput f
See! they admitted it! (Score:5, Funny)
I knew it all along!
Re:See! they admitted it! (Score:2, Funny)
Clippy? (Score:3, Funny)
Strains the definition of "shell", kinda (Score:4, Insightful)
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.
What about the applications? (Score:4, Interesting)
I have also a hard time imaging using objects being easier to understand for normal admins and users.
Also, when exactly did the shell stop to suck and begin to be a good feture? The same second Microsoft made their own version?
I've tried PowerShell (formerly Monad) (Score:4, Insightful)
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.
Re:I've tried PowerShell (formerly Monad) (Score:3, Interesting)
I always loved the old "Monad" name but I guess they changed it since no one got the joke. According to this page (second answer) [microsoft.com] the inspiration came from the 17th century philosopher Gottfried Leibniz. Leibniz proposed the concept of a Monad as the fundamental particle of the mental realm much as the atom is the fundamental particle of the physical realm.
Monads are supposedly self contained and closed off from any outside input. This leads to the joke as I understood it. In describing the concept in his
Downloading (Score:4, Interesting)
Re:Downloading (Score:5, Informative)
The contracts are not any different than what you would agree to with Google, Yahoo, or any other online service provider.
Furthermore, with only accepting the passport license, it's a bit shorter than hotmail's. Try reading it yourself. The TOS is actually very short and easy to read if you're not illiterate: https://accountservices.passport.net/PPTOU.srf?x=
And the point is? (Score:3, Interesting)
First of all, I would have to upgrade from Windows/2000 Professional to Windows/XP Professional. Since this costs money, I'm not terribly interested. My system has enough trouble running all the stuff I run now (2 databases, a web server, an application server, a development environment, etc. etc.). More operating system overhead is the last thing I'm interested in.
Second of all, I get to write scripts in another language that's not portable across all platforms. I've never worked in a monolithic environment, and I probably never will. Cross-platform tools are a requirement.
Third, I can do a lot of administrative programming for Windows in Perl. I imagine python and ruby have similar hooks (haven't checked). For personal productivity I run Cygwin's version of bash on this machine when I'm running Windows, and bash when I'm running Linux. Different people may want different interactive tools. Fortunately there are several cross-platform choices.
Finally, while I've heard about all these productivity gains with C# and .NET, I've not experienced it. I have .NET, C#, and Visual C++ .NET on the Windows side of my environment. What I've seen is that Microsoft makes a credible IDE. The IDE makes simple things easy, and complex things ridiculous. Transferring skills learned in the Microsoft world to any other environment is difficult at best, and pointless for the most part.
Oh - never mind - that's Microsoft's point.
Come kick the tires (Score:5, Informative)
http://www.microsoft.com/downloads/details.aspx?F
If you'd like to learn more, you can read our team blog at:
http://blogs.msdn.com/PowerShell [msdn.com]
Enjoy!
Jeffrey Snover
PowerShell Architect
Re:Come kick the tires (Score:3, Interesting)
Registration Required for This Download
Okay, so I've got a passport account (please don't mod me down for this, I was young and stupid.) And yet, you can't sign in because passport is freaking out.
I have been DYING for a worthwhile shell in windows. I've been using rxvt and aterm and they just don't match up to a console-only or yakuake session in true linux. I would LOVE to try your stuff. But you have to MAKE IT AVAILABLE TO DOWNLOAD.
Re:Come kick the tires (Score:3, Informative)
Jon
DIRECT DOWNLOAD LINK (no passpos) (Score:4, Informative)
http://download.microsoft.com/download/e/8/c/e8cc
Re:DIRECT DOWNLOAD LINK (no passpos) (Score:3, Informative)
Anyhow, here's the x64 link requested.
http://www.microsoft.com/downloads/info.aspx?na=90 &p=&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=4 A2D5ECB-0740-4AD5-98D3-EB236C3F37D9&u=http%3A%2F%2 Fdownload.microsoft.com%2Fdownload%2Fc%2F8%2Fe%2Fc 8e2b52a-d27c-447a-bd3f-73cf764beb26%2FPowerShell_a md64.zip [microsoft.com]
Re:Come kick the tires (Score:3, Interesting)
Some of the object-oriented features are quite nifty, and I don't see any of the standard UNIX shells doing that anytime soon. But I guess I'd really have to get into it bef
Obviously designed by programmers for programmers (Score:5, Insightful)
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
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
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
Believe it or not.... (Score:4, Insightful)
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.
REXX? AppleScript? (Score:5, Interesting)
I don't know, it sounds a lot more like the REXX and AppleScript way of doing things to me. An application exposes a dictionary of possible actions (rephrased in OO, an application object exposes methods) and passes the results to the next REXX or AppleScript-aware application.
Both REXX and AppleScript predate wide scale adoption of OO, so I might be off-base. It does sound very similar though, and personally I think there's room for both that approach and the classic Bourne shell-style approach.
Cheers,
Ian
Re:REXX? AppleScript? (Score:2)
Re:REXX? AppleScript? (Score:3, Informative)
For example, "dir" returns a stream of objects which are of type "File". If you pipe that output into another command then it has the full file information available to it from the object stream, so can act on the file contents, file name, file type, file dates etc if it chooses. Another command "list-users" may output a stream of user objects. Something else may output a
Re:How much will it cost? (Score:4, Informative)
Re:How much will it cost? (Score:2)
Re:Vista: Includes Free RootKit! (Score:5, Interesting)
Re:Vista: Includes Free RootKit! (Score:5, Informative)
Re:Kinda reminds me of Access (Score:5, Insightful)
Comment removed (Score:4, Insightful)