One of the things that is nice about PowerShell is that is supports many of the commands that we like to use in Unix/Linux. There are far too many useful things to demonstrate about PowerShell in one place, but the next two screenshots (click on them to see larger versions) demonstrate some Unix-like commands supported in Windows PowerShell.
The first screen snapshot demonstrates the very handy
history
command along with the ability to run a man
(equivalent to help
) command for a particular command.The next screen snapshot shows the
ls
command along with the mv
command. Having Unix equivalents makes it less frustrating to switch between Unix/Linux and Windows. Also, the ls
and mkdir
commands demonstrate the displaying of file modes.Besides the Unix/Linux commands shown in the screen snapshots above, other goodies that are now available in PowerShell include
pwd
, ps
, and cat
. It is amazing how nice it is to have these little "extras" in the DOS scripting world.Windows PowerShell requires .NET framework 2.0, so you'll need to get this if you don't already have it. There is much, much more to Windows PowerShell than what I've shown here so far. I think it is likely that I'll post future blog entries on other great features of PowerShell. It is even more likely that I'll start using PowerShell more frequently in my blog entries that show me running scripts, Java commands, the Flex compiler, etc. from the command line rather than using the old-style DOS terminal.
In related resources, Vaibhav discusses running PowerShell from Java. An interesting related article is A Return to Command-Line Control with Windows PowerShell. A free Windows PowerShell eBook is available as well. Finally, two other introductory references for using PowerShell are What is Windows PowerShell? and Top Ten Tips for Using Windows PowerShell Finally, a gentle introduction to Windows PowerShell is available in Discover PowerShell.
1 comment:
Please make sure to blog what things you think we can/should do better. We are working on the next version and would appreciate any input on how to make it better.
Cheers!
Jeffrey Snover [MSFT]
Windows Management Partner Architect
Visit the Windows PowerShell Team blog at: http://blogs.msdn.com/PowerShell
Visit the Windows PowerShell ScriptCenter at: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx
Post a Comment