246 PowerShell scripts for Windows 7 Diagnostics

by Doug Finke on June 14, 2009

in Diagnostics,PowerShell,Windows 7

Jeffrey Snover blogged about a "triumph of hope over experience" moments using Windows 7 Troubleshooting center Kudos to the Win7 Diagnostics Team.

He also suggested firing up this one liner in a PowerShell Window

dir $env:windir\diagnostics *.ps*1 –Recurse

There are 246 Win7 diagnostic scripts that have been delivered. Here are the number of scripts by folder for doing diagnostics.

Count Name                          
—– —-                          
   33 Power                         
   30 AERO                          
   26 Printer                       
   19 IEBrowseWeb                   
   19 Audio                         
   16 Performance                   
   16 Device                        
   15 Maintenance                   
   13 IESecurity                    
   12 Search                        
   11 HomeGroup                     
   10 Networking                    
    7 WindowsMediaPlayerPlayDVD     
    6 WindowsMediaPlayerConfiguration
    4 WindowsMediaPlayerMediaLibrary
    4 PCW                           
    3 DeviceCenter                  
    2 WindowsUpdate

How To Generate the above

dir $env:windir\diagnostics *.ps*1 -Recurse -name |
    ForEach { $_.Split("\")[1]} |
    Group -NoElement |
    Sort count -Descending | ft –a

{ 2 comments… read them below or add one }

Shay Levy 06.16.09 at 4:19 am

Nice! You could skip foreach-object and group on the split call:

dir $env:windir\diagnostics *.ps*1 -Recurse -name | Group { $_.Split(“\”)[1]} -noElement | Sort count -Descending

Doug Finke 06.16.09 at 7:54 am

Thanks Shay, scriptblocks can go anywhere

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Previous post:

Next post:

You are forbidden!