Export (0) Print
Expand All

Get-TroubleshootingPack

Windows Server 2012 R2 and Windows 8.1

Updated: October 17, 2013

Applies To: Windows 8.1, Windows PowerShell 4.0, Windows Server 2012 R2

Get-TroubleshootingPack

Gets a troubleshooting pack or generates an answer file.

Syntax

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




Detailed Description

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.

Parameters

-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.


Aliases

AF

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

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.


Aliases

P

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.Windows.Diagnosis.DiagPack

    The DiagPack object defines the troubleshooting pack.


Examples

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"

Related topics

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft