PowerCLI Reference



This cmdlet collects debugging information in order to identify a problem in the work environment.


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

Related Commands

Online version

Detailed Description

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


NameTypeDescriptionRequired?Pipeline InputDefault Value
ProblemDescriptionStringProvides a description of the problem you want to capture in the error report bundle.truefalse
ProblemScriptTimeoutSecondsDoubleSpecifies a time period in seconds for which you want to wait for the script to run before considering it non-responding.truefalse
DestinationDirectoryInfoSpecifies 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
ProblemScriptScriptBlockSpecifies the script that reproduces the error that you want to report.truetrue (ByValue)
DontIncludeServerLogsSwitchParameterIndicates that you want no logs from vCenter Server to be included in the error report. Setting this option to $false might slow down the operation.falsefalse

Return Type

Zero or more FileInfo objects



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

$script = {
$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 © VMware, Inc. All rights reserved.