Computer Performance, Microsoft Windows 7


Windows 7 PowerShell 2.0

PowerShell 2.0 in Windows 7PowerShell for Windows 7

Windows 7 PowerShell 2 sounds like a sport's result, but actually it's a new way of configuring the operating system from the command line. 

Topics: Windows 7 PowerShell 2.0

 ♦

Introduction to PowerShell 2.0

# Cmdlet Example
get-Process

The benefits of PowerShell v 2.0 in Windows 7 depend on your previous experience, and how curious you are!  The rest of this page is aimed at helping those with little or no experience of PowerShell to experiment with cmdlets such as get-process.  To newbies with no scripting experience I would also like to plant the seed of an idea, by learning PowerShell you will soon be writing scripts to automate your system, this will not only make you more efficient, but make computer configuration more enjoyable.

One day PowerShell will supersede DOS, however, its real advantage is that you can speed up configuration by typing a few commands, rather than endlessly clicking through GUI menus, for example type this cmdlet, get-hotfix.  Incidentally, all those old DOS commands work at the PowerShell command-line, therefore you have nothing to lose by abandoning cmd.exe and trying Windows 7's PowerShell with its ISE (Integrated Scripting Engine = GUI).

So far I have grossly underplayed PowerShell's vast abilities as a scripting language, this is because I don't want to discourage people learning PowerShell, just because they have no knowledge of VBScript, UNIX, C++ or any other scripting language.  I want to shout from the roof tops that PowerShell is that rare combination of an easy-to-learn language coupled with more sophisticated scripting power than you will ever need.

PowerShell v 2.0 Brings Remoting

The big improvement in PowerShell v 2.0 is its remoting capability; the significance is twofold, firstly, the Windows 7 desktops can communicate with the server using PowerShell commands.  As a result techies with Windows 7 laptops can configure their servers remotely by running PowerShell scripts.  Secondly, client logon scripts written in PowerShell, which reside on the server, can run on Windows 7 more easily.  Previously you would have had to install PowerShell on each Vista client; moreover PowerShell 1.0 had negligible remoting capability.

Another new feature in PowerShell 2.0 is a GUI.  Look out for the ISE version of PowerShell, along with the GUI you get a built-in script editor, thus its easier to edit scripts and run just snippets of the code more easily. 

Getting Started with PowerShell in Windows 7Microsoft PowerShell in Windows 7

Launching PowerShell in Windows 7 is a trivial task; unlike Vista, the .NET Framework and PowerShell binaries are already installed so just:

  • Click on the Windows 7 Start Orb
  • Type power
  • Select 'Windows PowerShell ISE' for the GUI version
  • Select plain 'Windows PowerShell' for the command-line version.

Microsoft Windows 7 PowerShell

Simple Examples of PowerShell Commands in Windows 7

get-service

or

get-eventlog -list

or

get-command -verb get

Slightly more advanced PowerShell commands

get-Service | where {$_.Status -eq "Started"}

or

get-EventLog system -newest 2000 | where {$_.entryType -match "Error"}

 

These short examples are just to whet your appetite, see much more on PowerShell scripts

Guy Recommends: SolarWinds LANSurveyorSolarwinds LANSurveyor

LANSurveyor will produce a neat diagram of your network topology.  But that's just the start; LANSurveyor can create an inventory of the hardware and software of your machines and network devices.  Other neat features include dynamic update for when you add new devices to your network.  I also love the ability to export the diagrams to Microsoft Visio.

Finally, Guy bets that if you take a free trial of LANSurveyor then you will find a device on your network that you had forgotten about, or someone else installed without you realizing!

Download a Free Trial of LANSurveyor

Summary of Windows 7 for PowerShell

In Windows 7 PowerShell version 2.0 is integrated into the operating system.  This is an improvement over Vista and Windows Server 2003 where you had to download version 1.0 along with .NET Framework, and then install them manually.

 While this scripting language is increasingly used by server administrators, there is no reason why keen amateurs should not try PowerShell, firstly as a replacement for cmd.exe, then onward to using PowerShell cmdlets to interrogate the operating system, for example type, get-process.  If you do experiment with Windows 7's PowerShell be sure to seek out the ISE version which has a GUI with an integral script editor.

Microsoft Windows Version 7 Configuration Topics

 *


Google

Web  This website

Review of Orion NPMGuy Recommends: Orion's NPM - Network Performance Monitor

Orion's performance monitor is designed for detecting network outages. A network-centric view make it easy to see what's working, and what needs your attention.

This utility guides you through troubleshooting by indicating whether the root cause is faulty equipment or resource overload.

Download a free trial of the Network Performance Monitor

 

Home Copyright © 1999-2009 Computer Performance LTD All rights reserved

Please report a broken link, or an error.