O'Reilly logo

Windows PowerShell® 2.0 Bible by Tome Tanasovski, Mark E. Schill, Karl Mitschke, Thomas Lee

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 3

Managing Windows 7

IN THIS CHAPTER

Troubleshooting Windows 7

Managing Windows Search

Checking hotfix status

Managing files and folders

Windows PowerShell allows you to troubleshoot Windows 7 problems and verify that patches have been installed. You are also able to manage Windows Search, performing searches and adding or removing folders in the search catalog. Finally, you can use Windows PowerShell to manage files and folders in Windows 7.

Troubleshooting Windows 7 with Windows PowerShell

Windows 7 comes with over 100 built-in scripts designed to facilitate troubleshooting. The number of scripts may vary, depending on which applications or service pack level your computer is running. You will need to import the scripts before you can use them. Because the scripts are provided in a module, you use the Import-Module cmdlet with the required parameter Name, and the name of the module, which is TroubleshootingPack. The following example imports the TroubleshootingPack module, which enables you to access any of the built-in troubleshooting packs:

Import-Module -Name TroubleshootingPack

The built-in scripts are located in the C:\Windows directory, in a subfolder named Diagnostics. The actual scripts are in separate subfolders under the System subfolder of the Diagnostics folder.

To get a list of the available troubleshooting packs, you use the Get-ChildItem cmdlet, with the parameter Path. The following example shows the current troubleshooting packs located under the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required