Windows PowerShell is command-line scripting environment which uses the Microsoft .NET Common Language Runtime (CLR) and the .NET Framework. But unless you have Windows Server 2008 it doesn’t ship with Windows by default. You can however download it at www.microsoft.com/powershell. You will also need the .NET framework 2.0 if you don’t already have that installed.
The most basic command in PowerShell’s scripting language is the cmdlet (command-let). A cmdlet resembles a function in that it performs a specific task, such as retrieving the contents of a folder on your hard drive or updating a registry entry. Every cmdlet is in the form of verb-noun, where the verb specifies the action to be taken. The noun indicates the type of object involved. For example, typing Get-ChildItem at the powershell prompt will retrieve a list of items in the current working directory. You can view a list of cmdlets by typing Get-Command at the prompt. PowerShell also includes a set of help files that can be accessed by typing Get-Help. Or you can get help on a specific cmdlet by typing Get-Help Get-content for example. Using the previous command Get-Help Get-Content you can retrieve more detailed information by using the parameter -full to the command (Get-Help Get-Content -full). All parameters must be phrased as -name. PowerShell also includes a series of help files that provide information on the various concepts. The files all begin with “about_” and end with the name of the topic. To view the list of topics type Get-Help about*. To view a specific topic type Get-Help about_Alias which will retrieve the file about Alias. Typing Get-Alias at the prompt with show you all of the aliases for powershell cmdlets. Aliases are used to specify a name that is usually much shorter then the actual cmdlet name. This should get you started in getting familiar with powershell, I’ll cover more in the next post.