PowerCLI Reference

Get-ErrorReport

Synopsis

This cmdlet collects debugging information in order to investigate a problem in PowerCLI or the work environment.

Syntax

Get-ErrorReport [-ProblemScript] <ScriptBlock> [[-Destination] <DirectoryInfo>] [[-ProblemDescription] <String>] [-MaxDataDepth <Int32>] [-IncludeServerLogs] [<CommonParameters>]

Related Commands

Get-ErrorReport

Detailed Description

This cmdlet collects debugging information in order to investigate a problem in PowerCLI or 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. Run Get-ErrorReport to generate the support bundle.


Customers can use the following portals to upload support bundles:


- ftpsite.vmware.com (instructions for upload - https://kb.vmware.com/s/article/2070100 )


- sftpsite.vmware.com (instructions for upload - https://kb.vmware.com/s/article/2069559 )

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
ProblemScriptScriptBlockSpecifies the script that reproduces the error that you want to report.trueTrue (ByValue)
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
ProblemDescriptionStringProvides a description of the problem you want to capture in the error report bundle.falseFalse
IncludeServerLogsSwitchParameterIndicates that you want the server logs (for example - from vCenter Server) to be included in the error report.falseFalse
MaxDataDepthInt32Specifies the amount of object data that should be included in the report.falseFalse

Return Type

System.IO.FileInfo

Notes

Examples

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

# Saves the script that reproduces the error into a variable and passes the script to Get-ErrorReport. The command provides a destination for storing the error report and a description of the observed problem.
$script = {
    Connect-VIServer 10.23.34.36
    $vapp = Get-VApp
    Get-VM VM -Location $vapp
}
$script | Get-ErrorReport -Destination "D:\error-reports" -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"


Copyright © VMware, Inc. All rights reserved.