Invoke-TroubleshootingPack

Windows Server 2012 R2 and Windows 8.1

Invoke-TroubleshootingPack

Runs a troubleshooting pack.

구문

Parameter Set: Default
Invoke-TroubleshootingPack [-Pack] <DiagPack> [-AnswerFile <String> ] [-Result <String> ] [-Unattended] [ <CommonParameters>]




자세한 설명

The Invoke-TroubleshootingPack cmdlet runs a troubleshooting pack in either interactive or unattended mode. A troubleshooting pack determines the root causes of issues, resolves the issues, and verifies that the issues were resolved. The cmdlet can save reports that detail issues and resolutions.

In interactive mode, you can select the resolutions to use and provide input to interactions with the troubleshooting pack. In unattended mode, the troubleshooting pack determines which resolutions to use at run time. While in unattended mode, if the troubleshooting pack requires input, you need to provide answers or specify an answer file. To create an answer file, use the Get-TroubleshootingPack cmdlet.

You can save the result report and the debug report, along with XSL and any linked files. Both reports contain the issues and resolutions. The debug report contains additional information.

매개 변수

-AnswerFile<String>

Specifies a path for an answer file. You can use an absolute path, a relative path, or a Universal Naming Convention (UNC) path. To generate an answer file, use the Get-TroubleshootingPack cmdlet.


별칭

AF

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-Pack<DiagPack>

Specifies a DiagPack object. The DiagPack object defines a troubleshooting pack. To obtain a DiagPack object, use the Get-TroubleshootingPack cmdlet.


별칭

P

필수 여부

true

위치

1

기본값

없음

파이프라인 입력 적용 여부

True (ByValue)

와일드카드 문자 허용 여부

false

-Result<String>

Specifies a path for the result report and the debug report. You can use an absolute path, a relative path, or a Universal Naming Convention (UNC) path.

If you do not use this parameter, the cmdlet does not save reports.


별칭

R

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

-Unattended

Indicates that the troubleshooting pack runs in unattended mode. If you specify this parameter and the troubleshooting pack requires input, specify an answer file in the AnswerFile parameter.


별칭

U

필수 여부

false

위치

named

기본값

없음

파이프라인 입력 적용 여부

false

와일드카드 문자 허용 여부

false

<CommonParameters>

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

입력

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

  • Microsoft.Windows.Diagnosis.DiagPack



    The troubleshooting pack to run. To obtain a DiagPack object, use the Get-TroubleshootingPack cmdlet.



출력

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

예제

Example 1: Run a troubleshooting pack

This example runs the Audio pack in interactive mode. This example does not save reports.

The command uses the Get-TroubleshootingPack cmdlet to get a DiagPack object and pipes it to the Invoke-TroubleshootingPack cmdlet.


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

Example 2: Save troubleshooting reports

This example runs the Areo pack in interactive mode and saves the results to a folder.

The first command uses the Get-TroubleshootingPack cmdlet to get a DiagPack object and stores it in the $Audio variable.

The second command invokes the troubleshooting pack stored in $Audio. The pack saves reports in the specified folder.


PS C:\> $Audio = Get-TroubleshootingPack -Path "C:\Windows\Diagnostics\System\Audio"
PS C:\> Invoke-TroubleshootingPack -Pack $Audio -Result "C:\DiagResult"

Example 3: Run a troubleshooting pack in unattended mode

This example runs the Audio pack in unattended mode with a specified answer file.

The first command uses the Get-TroubleshootingPack cmdlet to get a DiagPack object and stores it in the $Audio variable.

The second command invokes the troubleshooting pack stored in $Audio in unattended mode. The command specifies an answer file, previously created by using the Get-TroubleshootingPack cmdlet.


PS C:\> $Audio = Get-TroubleshootingPack -Path "C:\Windows\Diagnostics\System\Audio"
PS C:\> Invoke-TroubleshootingPack -Pack $Audio -AnswerFile "AudioAnswerFile.xml" -Unattended

관련 항목

커뮤니티 추가 항목

추가
표시: