vSphere PowerCLI Reference

Get-ErrorReport

Synopsis

Collects debugging information in order to identify a problem in the work environment.

Syntax

Get-ErrorReport [-ProblemDescription] <String> [-ProblemScriptTimeoutSeconds] <Double> [[-Destination] <DirectoryInfo>] [-ProblemScript] <ScriptBlock> [-DontIncludeServerLogs] [<CommonParameters>]

Related Commands

Online version

Detailed Description

Collects debugging information in order to identify a problem in the work environment. The cmdlet runs a script that reproduces the problem and captures any relevant information in a single .zip file. Then, you can send the .zip file to the PowerCLI support for analysis.
To generate an error report:
1. Isolate the problem into a simple script.
2. (optional) Set the vCenter Server logging level to "Trivia".
3. Run Get-ErrorReport to generate the support bundle.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
ProblemDescriptionStringWrite a description of the problem you want to capture in the error report bundle.truefalse
ProblemScriptTimeoutSecondsDoubleSpecify a time period in seconds for which you want to wait for the script to run before considering it non-responding.truefalse
DestinationDirectoryInfoSpecify the directory where you want to save the error report. If no value is specified for this parameter, the error report is saved in the current file system location.falsefalse
ProblemScriptScriptBlockSpecify the script that reproduces the error that you want to report.truetrue (ByValue)
DontIncludeServerLogsSwitchParameterIndicate that you want no logs from the vCenter Server to be included in the error report. Setting this option to $false might slow down the operation.falsefalse

Return Type

FileInfo

Notes

Examples

-------------- Example 1 --------------

$script = {  Connect-VIServer 10.23.34.36 $vapp = Get-VApp Get-VM VM -Location $vapp }  $script | Get-ErrorReport -ProblemScriptTimeoutSeconds 10 -ProblemDescription "No VM is returned. There are several VMs in this vApp. The vApp is in a DRS-enabled cluster. All VMs part of the vApp are expected to be returned." -Destination 'D:\bug reports'

Saves the script that reproduces the error into a variable and passes the script to Get-ErrorReport. The command provides a problem description, a destination for storing the error report, and a time period after which the script is considered non-responding.


Copyright © 1998 - 2011 VMware, Inc. All rights reserved.