Network Computing is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Rolling Review: Windows 2008 Server PowerShell: Page 2 of 4

For example, consider command No. 2. Starting after the pipe, we ask PowerShell to parse the results and return to us only the name and running state of all services on the local computer. Let's further suppose we want to display only the running state of all of the MS SQL-related services running on a host whose server name is SQLServer: Just add:

| Where-Object {$_.Name -match "MSSQL"}

The output of this command is a short and sweet display of all MS SQL related services and their running conditions. We found the PowerShell syntax quickly became second nature. In contrast, a similar VBScript script would be difficult to write and debug in a timely manner without a great deal of experience. And single-line PowerShell statements can be saved as scripts and invoked at any time.

While PowerShell 1.0 is a powerful tool, it has some serious limitations. The most glaring is that, because remote access to other systems in PowerShell 1.0 is limited to information that can be gathered via WMI queries, we were unable to remotely manage and kill system services and processes.

Microsoft's release of a Community Technology Preview version of PowerShell 2.0 addressed many remote administration issues via WS-Management version 1.1, or WinRM. Sometimes called PowerShell Remoting, WinRM provides a command-line interface that you can use to perform common management tasks. Under the hood, WinRM is a Web services-based protocol that uses HTTP and HTTPS for transport, and is therefore firewall friendly. Because WinRM uses ports 80 and 443 by default, you may need to do some tweaking of services that might lock up Port 80.