Windows PowerShell - Unix comes to Windows

  • 3 minutes to read
  • edit

Windows PowerShell (formerly known as “Monad”) is a Microsoft’s answer to the power and flexibility of the Unix command shells. It should finally complete the Windows management picture by providing a solid command line shell to administer Windows systems. PowerShell is part of Vista, but fortunately for all of us, it is being released separately and is available for Windows XP as well.

PowerShell is a command line shell that is:

PowerShell seems to have incorporated many of the best features of the Unix shells, such as:

Scripting

Text Processing Model

function top ($property="Handles", [int]$count=10)
{
    Get-Process | sort $property | select –first $count
}

For those of you who have written Unix shell scripts before (and maybe a lot of people who haven’t) the syntax should look familiar. This declares a function named “top” which takes two parameters (both with defaults) and returns a sorted list of the top $count processes sorted by $property.

Comments