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>

이 cmdlet은 일반 매개 변수 -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer 및 -OutVariable을 지원합니다. 자세한 내용은 다음을 참조하세요. about_CommonParameters(https://go.microsoft.com/fwlink/p/?LinkID=113216).

입력

입력 유형은 cmdlet에 파이프할 수 있는 개체의 유형입니다.

출력

출력 유형은 cmdlet이 내보내는 개체의 유형입니다.

  • 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"

관련 항목

Invoke-TroubleshootingPack