An Introduction to Microsoft PowerShell - PowerShell Features
(Page 2 of 4 )
PowerShell was designed to take all of the best features from several different command line environments including Linux and Windows’ Command Prompt. One of the core design features was that PowerShell be usable by both system administrators and application developers.
The design team started out by improving upon some of the existing CMD features. One example was improved pipelining and output redirection. While this was possible in CMD, support was limited at best.
Along with the upgrades comes a completely new object-oriented framework. Commands in PowerShell output objects rather than blocks of text. These objects can be acted on immediately using the properties and methods associated with that object.
PowerShell also introduces a consistent command naming convention using a verb-noun structure. This pattern makes it much simpler to remember a few object names rather than an array of archaic commands and parameters.
If that isn’t enough there’s added functionality as well. PowerShell can do things that no other command line shell can do in Windows such as navigate the Windows Registry as if it were a file system. You can navigate the registry like a folder system, viewing and changing registry keys and values as you go. No third party scripts or programs are required.
PowerShell has another indispensable feature as well. It allows you to preview the effects that your scripts will have on the system. Commands that create or change objects support the confirm and whatif flags. The confirm flag forces the user to confirm an action before it is executed and the whatif flag will show you what happens without actually performing the action.
In Windows PowerShell help is always at your fingertips. The shell environment has a very well written help system as well as a very in depth online reference. Questions in PowerShell don’t go unanswered long.
If you do have trouble learning to work in your new environment, don’t worry. The commands in Windows PowerShell support aliases, meaning you can use different commands for the same item. Let’s say you want to get a directory listing. In PowerShell you would use the command Get-ChildItem. No need to fear if you forget, you can type the friendly dir command as well.
All PowerShell commands have aliases for their CMD counterparts. If that’s not enough try using ls. That’s right! There are aliases for most Linux equivalents as well.
Next: A Look at Cmdlets >>
More Windows Scripting Articles
More By Nilpo/Developer Shed Staff Writer