Any seasoned admin will agree that command line is the faster as compare to GUI under Windows and UNIX.
As a part of my job some time I am forced to work in a Windows only environment and I do miss my bash shell very badly :(
Recently Microsoft announced Windows PowerShell. This new shell and scripting language helps IT Professionals achieve greater productivity. Using a new admin-focused scripting language, more than 130 standard command line tools, and consistent syntax and utilities, Windows PowerShell allows IT Professionals to more easily control system administration and accelerate automation :)
=> Supported Operating Systems: Windows Server 2003 Service Pack 1; Windows XP Service Pack 2
=> Download and more information about Windows PowerShell at msdn blog.
=> Complete information and documentation for Windows PowerShell
Featured Articles:
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- 10 Greatest Open Source Software Of 2009
- My 10 UNIX Command Line Mistakes
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- Top 20 OpenSSH Server Best Security Practices
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Linux Video Editor Software
- Email this to a friend
- Download PDF version
- Printable version
- Comment RSS feed
- Last Updated: Dec/27/2007



{ 11 comments… read them below or add one }
There are two *way* better commandline options for Windows than the “Power Shell”:
1] JPSofts 4NT or TakeCommand. They’re pretty expensive @ US$75 each, but I’ve been using 4NT for a dozen years or more and would be lost without its power. http://www.jpsoft.com
2] Lately though I’ve become a real Cygwin addict. It’s a bit tricky to set up, but it is a very active group and they do a bang-up job of keeping the environment Linux compatible, right down to the latest controversial change where Bash doesn’t like CR/LF, just like on Linux:-) http://www.cygwin.com
Jonathan,
4NT or TakeCommand is new information for me. I was only aware of Cygwin which a quite good choice…
I am downloading 4NT/Take Command 30 days trial. We might end up purchasing few copies :)
Appreciate your post!
I’ve never heard of those two either, however, from the little I’ve used Powershell, I’ve enjoyed it.
There’s also IronPython which was just released not too long ago. With it, you can access all of .NET, WMI, and even interface with PowerShell through a Python environment.
Hey guys, I’ve been a UNIX developer for a long time, mainly working on FreeBSD, OpenBSD and Linux platforms.
I am now working at Microsoft, and I do a lot of stuff with powershell. As far as Cygwin or JPSoft stuff being “way better” I’ll have to disagree:
* Powershell is much more powerfull: it doesn’t work on text streams, like unix shells. It (only) works on objects. So input/output pipelines are all .NET objects.
* Powershell, as language is much more expressive then any UNIX shell, period. The closest thing that can match it is Perl 6 or Ruby.
* For Windows scripting, it is the best choice because its specifically made for it. Its tied into Windows (registry, etc).
* It has built-in aliases for most common UNIX commands (ls, cat, ps … etc), so you don’t have to get used to Windows cmd.exe command alternatives. If you just open powershell terminal you should feel right at home!
Check out PowerTab sometime …
-Dmitry
A big limitation with PowerShell, though, is job control. The pipes don’t work in a concurrent style. For the kind of scripts I write on my machines (all are at least 2-core, my main desktop 4-core), a careful bit of:
(
echo "Foos and bars:"
(
foo | foo2 | foo3 > foo.out &
bar | bar2 > bar.out &
wait
)
sort foo.out bar.out
) | baz2 | ... &
… etc. works wonders for running times.
I tested the new PowerShell which Windows copied from Unix, a lot of things are still missing. It has about 60% of it’s power, but it does not equal to the command line shell of unix. Linux has always been my choice for work, wouldn’t change it for Windows still. Unfortunately a lot of companies use only Windows, it can be a lot of unnecessary drag.
“PowerShell which Windows copied from Unix”
thats like saying Unix copied punch cards…or IBM terminals
you need to input things into a computer…a black screen with a promt is the easy way to do it. The features of the UNIX command shell are standard routines a computer should be able to do….
BASH (most popular unix around right now) has less features then windows powershell.
the only main problem is with job control, but they are adding that in with powershell 2.0
Okay, so I want to count the number of commands returned by get-command cmdlet
get-command | WHAT THE FIRK DO I PUT HERE?
in unix it would be: ls /usr/bin | wc -l
in Powershell, you have to know a billion frikking options and dash this and dollar underscore that before you get something simple like commanline.
Microsoft has NEVER thought of commandline as the first class citizen and it still shows. MS people are going gaga over this because they have never felt the power of the unix commandline.
I can have a regular user be productive with a subset of unix shell commands.
in Powershell, either you’re a hotshot VB / .Net programmer (in which case you know the object hierarchy) or you’re screwed!
Tell me how I count th number of commands outputted by get-command?
is this get-command -text output -count ?
nope
is this get-command | get-count?
nope
WTF is it?
im a linux geek working in a microsoft shop. i’m just learning powershell, but i’ve been blown away by how capable it is. truly amazing. one thing that seems interesting is that powershell appears to have found all my cygwin commands as well. so from right in powershell i can use less, vim, tail, grep….
however for the command count thing i’d go with this:
$commands = get-command
$commands.length
or more concisely how about
$(get-command).length
(get-command).length
OR, for more complete processing,
get-command | measure
(get-command).count