Fresh from an almost missable US launch of Zune, Microsoft was back on familiar ground Tuesday touting server, security and admin software to reassure shareholders the company’s future is bright. Bob Muglia, Microsoft’s senior vice president for server and tools opened the company’s IT Forum in Barcelona, Spain, by promising a third, and final, beta of Windows Longhorn Server during the first-half of 2007 with full product availability by years’ end. Microsoft also officially launched its PowerShell.
It’s about time Microsoft put out a halfway-decent shell. I use Ubuntu myself, but I do have to use Windows sometimes, and I hate how half-baked CMD feels.
I haven’t been following Monad/PowerShell closely. I think one of the features added was integration into the .NET Framework. So, my understanding is that you have access to all of the same objects you would have in Visual Studio. That’s all cool and all. But, I would be happy if they would just make the cmd window more usable. For starters, they could make it easier to resize. Another thing they could do would be to make the history work smarter. Essentially, I’m saying “copy any of the shells on *nix”.
Last time I used PowerShell, it had aliases for common *nix and cmd commands. And PowerShell does let you use anything in the .net FX. Unfortunatley, the shell window still sucks (as in, unchanged).
Modded you up, cmd.exe is horrid, the only good thing that can be said about it is that it’s not command.com. It’s inexcusably cumbersome to copy-paste text to/from CMD windows. It also feels pretty amateurish that shortcuts are effectively ignored in the command line (Oh, a 0KB .lnk file, how useful).
Thankfully they changed the “Monad” name, though.
Just wondering why someone would bother to learn a whole slew of commands for Windows. Generally speaking, people who want the power of a command line do not bother to deploy Windows and people who want Windows don’t want half the features to be hidden in the command line. I realize that this is a direction Microsoft wants to go but how many people seriously use the command line tools for Windows 2003 (DHCP, DNS, Active Directory, Services, etc?)
Before Microsoft hopes to get anywhere with a command line, they need to clean up their directory structure, ax the registry and simplify things down quite a lot. Unix was built from the ground up with the assumption of configuring everything from the command line. The last time anything was really built for the command line in Microsofts world was during the days of DOS. Unix is far more than just passing parameters to applications through the command line.
Vista’s directory structure is much cleaner then XP’s already, so I guess you’re right
But it isn’t though.
I recently had two similar hard drive failures. One was on my Linux machine and the other was on a friend’s Windows laptop (Sure his laptop is XP, but I’ve seen Vista builds and the directory structure, while better, is still problematic).
On Linux, I simply copied all the contents of my home directory to a portable hard drive, replace the bad drive, reinstalled Linux and copied everything back. I had to configure a couple of minor things a bit, but overall, it was a simple process.
On my friend’s Windows machine, the only damage to files was done in the Windows System32 directory. Everything else was intact. However, it was almost impossible to restore his drive because things were sprawled out all over the system.
The first two things Microsoft could do to clean their directory structure would be have home directories and limit regular users ability to save anything outside of that, and get rid of the stupid alphabet partitions. They are retarded.
Edited 2006-11-16 07:36
You could have just did a repair install with a XPSP2 CD, that would have fixed his system32 directory, then ran windows update. No need to copy things to another drive, except to maybe backup data. Just because things work differently, does not make things better or worse, just different.
Also considering that I was comparing XP’s filesystem layout to Vista’s, your entire post is irrelevant. You also disagreed with me on the first sentence, then agreed with me 3 lines down. Please, make up your mind
Also, just for laughs, you could have just booted to the command prompt and fixed it with a command or two, from there.
“documents and settings”?
should contain any user data unless the user is using some pre win2k (or something like that) program.
I believe any change to cmd.exe is welcome change. Windows has been lacking a functional shell. Just because it doesn’t implement the “xx” standard of shell programming doesn’t make it bad.
If you don’t know by now, Microsoft hardly ever codes with Interop in mind (As far as other platforms go) and it will be a while since that changes.
I don’t think there’s anything wrong with the PowerShell syntax and it will allow Windows to become more community oriented. (Submitting Scripts to automate OS tasks)
There’s been a bunch of community oriented stuff popping up. Gadgets, IE7 Addons, and now Powershell scripts?
If anything I’d call this an extremely good thing for Microsoft.
It should also be noted that there’s more to Windows management than cmd. PowerShell unifies cmd, WSH, WMIC, and more. Most people probably aren’t writing batch language scripts to manage servers, but many do use the other above technologies interactively and in scripts.
PowerShell gives more access to the system, simplifies coding against existing technologies, and is more accessible than the previous technologies for new users. It’s also going to be baked into MS’ server products (Exchange and MOM first) and later the system itself, with MMC integration, cmd utilities being replaced with cmdlets and applications either built atop cmdlets or using them to more directly expose functionality to the shell.
Edited 2006-11-16 00:39
If you don’t know by now, Microsoft hardly ever codes with Interop in mind (As far as other platforms go) and it will be a while since that changes
Which breaks one of the most important feature of a shell : be compatible with at least Korn Shell.
I don’t think there’s anything wrong with the PowerShell syntax and it will allow Windows to become more community oriented. (Submitting Scripts to automate OS tasks)
That would be good but I dount it will, as PowerShell depends on .NET. Which means when .NET changes, it can make your shell change behaviour.
A shell should not depend on anything more than a C library. There’s a reason it’s called a shell, not a script language.
I don’t think it’d change behavior persay but it’d simply either not work or be updated.
They’re becoming more .NET oriented torwards the future and to be able to access .NET objects from the shell this decision was needed.
I think it adds functionality to be able to target both managed and unmanaged applications.
Of course I’m saying this from a C# coders prospective.
A lots of software use MS command line tools. They’re mostly needed for automation purposes, of course, as there is no other goal in using a command line tool vs a GUI for non-automation operations.
If you look carefully, many server softwares make broad usage of such tools. Sometimes you got aware of such usage if anything goes wrong and you have a log file to examine.
“Monad” is much more than a simple enhanced shell. Just to name one, while you can only pass text parameters to various Unix shells, you can pass complex objects to Monad / PowerShell scripts, paving the road to much more complex scripts.
No. This is flat out wrong. There is no restriction on how programs can communicate with eachother on UNIX. In fact, this doesn’t really have anything to do with the shell at all. Most UNIX programs pass text streams between eachother via pipes by _convention_. You could also pass arbitrarily complex “objects” using text. Hell, we could even be trendy, if we wanted, and use XML for the markup.
If you really wanted an object orriented shell on UNIX that communicates via binary blobs through rigid APIs, you could just run the python interpreter interactively.
A lots of software use MS command line tools. They’re mostly needed for automation purposes, of course, as there is no other goal in using a command line tool vs a GUI for non-automation operations
No other goal ? I see at least two others : headless administration and fast remote control.
If you look carefully, many server softwares make broad usage of such tools
That’s because servers don’t need a GUI to run …
“Monad” is much more than a simple enhanced shell. Just to name one, while you can only pass text parameters to various Unix shells, you can pass complex objects to Monad / PowerShell scripts, paving the road to much more complex scripts
That’s because the few input systems that we have, like the keyboard, only contains text on it.
I wonder how you input your complex objects to your commands without using text.
I also wonder what is the use for your complex objects, as we can already control pretty much anything with a basic Unix shell.
“”Monad” is much more than a simple enhanced shell. Just to name one, while you can only pass text parameters to various Unix shells, you can pass complex objects to Monad / PowerShell scripts, paving the road to much more complex scripts.”
And there lies the problem. Who wants to code complex shell scripts? scripts have to be simple. Otherwise you should be using some programming language. You need to first understand the unix shell to assert something like that. The power of the unix shell is that you only need text, plain text, to use it.
You should read Mastering UNIX Shell scripting, from John Wiley and Sons.
And there lies the problem. Who wants to code complex shell scripts? scripts have to be simple. Otherwise you should be using some programming language. You need to first understand the unix shell to assert something like that. The power of the unix shell is that you only need text, plain text, to use it.
Scripts can be as simple or as complex as the task(s) you’re trying to accomplish. If you want scripts that do one thing, and you feed the results someplace else, you’re free to do so.
PowerShell doesn’t preclude you from working with plain text. There simply is no need to do so most of the time, and you just create more work for yourself manually parsing and formating that text rather than letting the shell do the work for you. Though even with that type of workflow, you can still take advantage of the fact that you’re working with strings.
“PowerShell doesn’t preclude you from working with plain text. There simply is no need to do so most of the time, and you just create more work for yourself manually parsing and formating that text rather than letting the shell do the work for you. Though even with that type of workflow, you can still take advantage of the fact that you’re working with strings.”
But it doesn’t promote text handling either. I wonder what kind of script you think you would be writing most of the time that doesn’t use any text manipulation at all.
All in all, Windows doesn’t use text files. It uses mostly binary files, so it’s pretty rigid as you may see. In unix-like OS, all configuration and log files are just plain text you can parse with filter utilities. You don’t have to manually open files, manipulate binary structures and all things associated. It’s simple as sed -i ‘s/hard/simple/g’ somefile and you are done. No need to know some obscure API for changing some class attributes.
I don’t think that powershell will have any real use comparable to the unix shell. They are both different, but the unix shell is more flexible and that’s what makes it successfull today. Microsoft’s new toy doesn’t bring anything new. If you are using a console, you are using text. If your shell doesn’t support text handling easily, then it pretty much sucks.
But it doesn’t promote text handling either. I wonder what kind of script you think you would be writing most of the time that doesn’t use any text manipulation at all.
What specifically is there to promote about using text? You can input, output, and manipulate text, but if you don’t have to, why do it when it’s less productive?
All in all, Windows doesn’t use text files. It uses mostly binary files, so it’s pretty rigid as you may see. In unix-like OS, all configuration and log files are just plain text you can parse with filter utilities. You don’t have to manually open files, manipulate binary structures and all things associated. It’s simple as sed -i ‘s/hard/simple/g’ somefile and you are done. No need to know some obscure API for changing some class attributes.
(gc somefile) | %{$_ -replace “hard”,”simple”} | sc somefile
No obscure API, just PowerShell, and in it’s long form
(Get-Content somefile) | ForEach-Object{$_ -replace “hard”,”simple”} | Set-Content somefile
much easier for someone else to read, or for you to read with the passage of time.
Sed and other utilities can even be used from PowerShell. Yes, not all files are plain text (some are), but there are likewise structured or binary files on n*x, and all n*x may not use the same formats for their files, you may only want a subset of info from the files, or the formats may change between releases.
With PowerShell, you’re addressing an object model and are abstracted from these changes. Your scripts continue to work.
I don’t think that powershell will have any real use comparable to the unix shell. They are both different, but the unix shell is more flexible and that’s what makes it successfull today. Microsoft’s new toy doesn’t bring anything new. If you are using a console, you are using text. If your shell doesn’t support text handling easily, then it pretty much sucks.
Then by your definition, PowerShell doesn’t suck. As for real use, many people have put PowerShell to real use since the first beta was shipped.
I tries the first beta. It was amazing. You entered ‘dir’ and 10 minutes later, you got the column headings appear. Things are marginally faster with the release, but you still feel the whole bulk of the .NET framework grinding into gear.
tries the first beta. It was amazing. You entered ‘dir’ and 10 minutes later, you got the column headings appear.
3 seconds to use WMI to find the top 20 mailbox sizes out of 2500 mailboxes on the remote exhange server.
Not quite “10 minutes later”.
Beta 1 was very slow. Maybe not in the order of 10 minutes per command, but I found myself drumming my fingures waiting for it to enumerate a directory.
Beta 1 was very slow. Maybe not in the order of 10 minutes per command, but I found myself drumming my fingures waiting for it to enumerate a directory.
If it was beta 1, why waste our time discussing it?
Because I was replying to the comment:
As for real use, many people have put PowerShell to real use since the first beta was shipped.
Who wants to code complex shell scripts?
People who want a choice?
I downloaded Powershell and gave it try. It does seem much more powerful than the crappy cmd.exe, but why does it have to eat up 40mb of RAM? Is it because it runs on .Net? Geez.
40 mb? That’s practically nothing.
Although I am a java dev by trade, so I may be used to application bloat.
40 mb? That’s practically nothing.
Although I am a java dev by trade, so I may be used to application bloat.
Sure ! Because some people already complain when some shells takes 10 times less memory !
So saying 40 mb is nothing is nonsense : it’s huge.
Must be one of the reasons why PowerShell is so slow.
“40 mb? That’s practically nothing.”
Sure, compare it with the mere 2MB (RSS) bash uses…
What about this http://powershell.sourceforge.net/ ?
Could they sue MS?
Waiting for the first Powershell virus?
No need look here…
http://news.com.com/2100-1002_3-6101106.html?part=rss&tag=6101106&s…
Amazing….after 40 years of clean virus free Unix powershell, Microsoft does it again…unbelievable. DO NOT MIX .NET / ACTIVEX WITH ADMIN TOOLS!!!
Are there still admins out there that actually take MS software seriously?? i wonder..
Edited 2006-11-16 22:03
Waiting for the first Powershell virus?
No need look here…
Moron.
“The worm doesn’t exploit a specific security hole in PowerShell. Instead, it abuses the product’s ability to execute scripts by attempting to trick users into downloading and running malicious code.”
http://blogs.msdn.com/powershell/archive/2006/08/03/687838.aspx
Most Windows users are indeed Morons like you…Its not about how you call it its about what it can do to “normal” users. Stay ignorant. Stay believing in it. Good Luck!
Most Windows users are indeed Morons like you…Its not about how you call it its about what it can do to “normal” users. Stay ignorant. Stay believing in it. Good Luck!
“This is a proof-of-concept virus whose “Worm” replication mode is just a simple file copy and could have been implemented in any language which supports copying files. The fact that the worm is written in PowerShell rather than another scripting language or even as an executable has actually made it even harder for this virus to spread since the additional security features around PowerShell scripts result in many additional steps for the user to perform before an infection can take place.”
Moron.
You only read part of the story. Better read the whole story and try to actually think about the possibilities.
As much as i disagree with you i would never call you a m!r!n beause of that. Makes you look very dumb.
As i sad before keep ignorant! Believe waht you want i do not care.
You only read part of the story. Better read the whole story and try to actually think about the possibilities.
I read the whole thing.
What does a user have to do to become infected:
1)For a client machine to be infected, the user must first have installed both Windows PowerShell and a Kazaa client.
2)The user must download the worm to their local machine.
3)The user must change the file extension of “AVP – AntiVirus Key Generator.msh” from .msh to .ps1
3) The user must manually start Windows PowerShell since files with the .ps1 file extension cannot be executed directly from Explorer. Notepad is the default file association for .ps1 files.
5) Once Windows PowerShell has started, the user must set their execution policy from the secure default of Restricted to either RemoteSigned or Unrestricted.
If you think the above 5 steps are likely versus a million other ways to get a user to do dumb things, then you are a moron.
I installed PowerShell on a vm….
It’s a joke.
Is this really supposed to compete with the shells used in a Linux system? I mean, on Linux I can do ANYTHING from the command line.
With this… I can move files around.
High Five!
With this… I can move files around.
I’m not a Powershell expert. Barely touched it so far.
Heres a one liner that would find the top 5 mailboxes by size (via WMI) if you had an exchange 2003 server called exchgbox:
get-wmiobject -class Exchange_Mailbox -Namespace ROOTMicrosoftExchangev2 -ComputerName exchgbox | sort Size -desc | Select -first 5
I *love* WMI. Just as an example of why, try to find out something about WMI.
try: Get-WmiObject -list
…Now, I know there’s a class method to Win32_Dynamically_re-flash_the_bios_to_play_the_National_Anthem_on_boo t
somewhere in the list, but where is it? and what does it do?
It’s a good thing that Microsoft tends not to care about case, or I’d go mad trying to get all the capitals in the right places.
tabcomplete
One of the great things about ZSH is that it has dynamic tabcompletion. So If I’m copyinga file toaremote computer (using scp), pressing tab when choosing the remote directory will cause ZSH to query the remote system and provide directory autocompletion.