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
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop














{ 15 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
Nope. Not even close.
Why should I want to do this:
get-content -tail 5 .\file.txt
When I can do this:
tail file.txt
Powershell is far too wordy. Period. There is no reason, other then typical MS trying to be cool, for this.
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
JohnnyWang: there is one small flaw in your statement – PowerShell was developed by people who have been using Unix command line for like 20 years, it just uses the object-oriented pipeline instead of text-oriented, so you have to start think in objects… it’s like being angry over object C being too complicated after working with Pascal =)
I’m intrigued by PowerShell as a long time Windows user AND a 20+ yr UNIX admin and C/C++ developer. I can see where the “object” pipeline may become more powerful after lots of learning, just like Ruby’s methods are nice AFTER you spend the time learning them. When you have 20+ yrs of shell scripting and aliases have been created to “feel like UNIX/Perl”, I have to wonder. I’m constantly wondering where ‘egrep’ is so I can enter fairly complex regex statements. Don’t get me started on the array notation – what was wrong with the way PERL did it? Being different just to be different is an issue, IMHO.
I’m not looking forward to picking up a script from someone who never learned the UNIX way and wasted all that time typing “Get-Selection” or whatever else Microsoft decided to name some command to make it really-really-really long.
Lastly, I wish they could support CRLF and just CR EOLs. The computer doesn’t care, so why do all the text-based programs on Windows care still?
None of this is meant as a put down towards Powershell – just a few observations.
guys, talking about powershell makes this page messy, some opinions creates a big questions to some newbies, which one do i have to use? is it the bash or the powershell?? Well, as far as i’m concern, Being a linux users, i do prefer using the terminal and kick off some works using the bash shells, and well, for those who uses windows platforms who are really tired or putting his/her finger on keyboard to type the bash scripts, they can use powershell to fullfill there needs. its depend on them and the platform that they we’re using. but there is so many thing that the linux terminal can do other than the powershell. and that is the fact.