Feb 15, 2010

Windows 7 - Use Windows PowerShell to Monitor System Performance

Windows 7 - Hide Updates that you do not Ever Want to Install

If you choose not to download and install an update, it’s available for you the next time you visit Windows Update…and the next time, and the time after that as well. You might have a good reason for not accepting a particular update—perhaps it makes improvements to a Windows feature you never use—and there’s no reason it should clutter your list of available updates. To remove an item from the list without installing it, you hide it. This is a pretty easy trick, but the option for hiding updates in the list is itself somewhat hidden and often goes overlooked.

In the list of available updates, right-click any update that you don’t want to see again, and choose Hide Update. If you later change your mind—or if you just want to see a list of the updates you’ve chosen to hide—on the main Windows Update page, click Restore Hidden Updates.

Windows 7 - Use Windows PowerShell to Monitor System Performance

A new feature in Windows 7 is the ability to use Windows PowerShell for gathering performance data. Three new Windows PowerShell cmdlets provide functionality as follows:

Get-counter Gets real-time performance counter data from local and remote computers.

Import-counter Exports Performance Counter Sample Set objects as performance counter log (.blg, .csv, .tsv) files.

Export-counter Imports performance counter log files and creates objects that represent each counter sample in the log.
For example, the following Windows PowerShell command gets the current “% Processor Time” combined values for all processors on the local computer every 2 seconds until it has 100 values and displays the captured data:

PS C:\Users\mallen>Get-counter -Counter "\Processor(_Total)\% Processor Time" -SampleInterval 2 -MaxSamples 100

The following command continuously gets the current “% Processor Time” combined values for all processors on the local computer every second (the default sampling interval) and displays the captured data until you press CTRL+C:

PS C:\Users\mallen>Get-counter -Counter "\Processor(_Total)\% Processor Time" –Continuous

You can pipe the output of the Get-counter cmdlet into the Export-counter cmdlet.For example, the following command gets the current “% Processor Time” combined values for all processors on the local computer every 2 seconds until it has 100 values and exports the captured data as a performance counter log file named Data1.blg, which is saved in the current directory (here the root folder of user user1 profile):

PS C:\Users\ user1>Get-counter "\Processor(*)\% Processor Time" -SampleInterval 2 -MaxSamples 100 | Export-counter -Path $home\data1.blg
You can also pipe the output of the Import-counter cmdlet into the Export-counter cmdlet. You might do this, for example, to convert a performance monitor log file from one format to another, such as from .csv to .blg format.

0 comments:

Text Widget

Copyright © Vinay's Blog | Powered by Blogger

Design by | Blogger Theme by