Get-TroubleshootingPack

Get-TroubleshootingPack

Gets a troubleshooting pack or generates an answer file.

構文

Parameter Set: Default
Get-TroubleshootingPack [-Path] <String> [-AnswerFile <String> ] [ <CommonParameters>]




詳細説明

The Get-TroubleshootingPack cmdlet gets a DiagPack object that you can pass to the Invoke-TroubleshootingPack cmdlet.

The Get-TroubleshootingPack can also get information about a troubleshooting pack and generate an answer file.

パラメーター

-AnswerFile<String>

Specifies a path where the cmdlet saves an answer file. You can use an absolute path, a relative path, or a Universal Naming Convention (UNC) path. If you specify this parameter, this cmdlet does not provide output.

You can use the Get-TroubleshootingPack cmdlet to generate an XML file that contains answers to troubleshooting questions. You can use the answers stored in an answer file to automate question responses during package execution using Invoke-TroubleshootingPack.


エイリアス

AF

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Path<String>

Specifies a path to the folder that contains the troubleshooting pack. You can use an absolute path, a relative path, or a Universal Naming Convention (UNC) path.


エイリアス

P

必須?

true

位置は?

1

既定値

なし

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (http://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

  • Microsoft.Windows.Diagnosis.DiagPack

    The DiagPack object defines the troubleshooting pack.


Example 1: Get a troubleshooting pack

The command gets the troubleshooting pack for Audio in the specified path.


PS C:\> Get-TroubleshootingPack -Path "C:\Windows\Diagnostics\System\Audio"

Example 2: Get a root cause

This example shows how to discover a root cause from a troubleshooting pack.

The first command gets the troubleshooting pack for Audio in the specified path and saves that object in the $Audio variable.

The second command displays a root cause. The $Audio object contains an array of root causes. This command uses conventional array notation to access the third member of the array.


PS C:\> $Audio = Get-TroubleshootingPack -Path "C:\Windows\Diagnostics\System\Audio"
PS C:\> $Audio.Rootcauses[2]

Example 3: Get a resolution

This example shows how to discover a resolution for a root cause.

The first command gets the troubleshooting pack for Audio in the specified path and saves that object in the $Audio variable.

The second command displays a resolution for a root cause. The $Audio object contains an array of root causes, each of which contains an array of resolutions. This command uses conventional array notation to access the first resolution for the third root cause.


PS C:\> $Audio = Get-TroubleshootingPack -Path "C:\Windows\Diagnostics\System\Audio"
PS C:\> $Audio.RootCauses[2].Resolutions[0]

Example 4: Generate an answer file

This command uses the Get-TroubleshootingPack cmdlet to generate an answer file. The Areo troubleshooting pack provides a series of questions for the user to describe the troubleshooting situation and saves that information in the specified XML file.


PS C:\> Get-TroubleshootingPack -Path "C:\Windows\Diagnostics\System\Audio" -AnswerFile "AudioAnswerFile.xml"

関連トピック

コミュニティの追加

追加
表示: