One of the first question on the microsoft.public.windows.powershell newsgroup was "What is Windows PowerShell?".

Windows PowerShell is a new Windows command shell, designed to provide a new, more flexible, more powerful command shell than the current Windows command shell based on CMD.exe. It is designed to produce a more efficient command line experience for Windows administrators and power users.

Windows PowerShell is based on the .NET Framework. It uses object-based pipelines to allow you to combine commands to produce useful results.

Windows PowerShell is also a powerful scripting language. It uses cmdlets (pronounced command-lets) which can be composed in pipelines. Each step in a pipeline is separated by the | character. For example, to find all running services on your machine use the following command:

get-service | where-object {$_.status -eq "running"}

This pipeline has two steps. In the first step you use the get-service cmdlet to retrieve information about all services on the local machine. In the second step you use the where-object cmdlet to filter the objects from the first pipeline step. The code in the curly brackets, {$_.status -eq "running"}, tests whether the value of the status property of the current object, $_, equals running. If it does then the object is passed to an implicit third step in the pipeline which displays the results. Objects whose status property does not equal running are discarded.
Pipelines can have many steps to, for example, allow you to filter, sort, group objects.

Results can be displayed using the default formatter or you can take more control of how output is displayed by using formatting cmdlets such as the format-table and format-list cmdlets.

Advertisements

Why yet another blog?

I'm excited by the potential of Windows PowerShell for professional administrators and power users to get a handle on their Windows computers and plan to use this blog to describe, explore, comment and pontificate about any issue relating to Windows PowerShell that interests or puzzles me.

And, of course, I plan to post and discuss some PowerShell scripts that hopefully will be useful to people who are learning about Windows PowerShell and learning how to use it.

PowerShell is different in many significant ways from other command line shells and scripting languages. So I ought to have plenty to write about over the coming months.