powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Get-ErrorReport



NAME
Get-ErrorReport

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

SYNTAX
Get-ErrorReport [-ProblemDescription] [-ProblemScriptTimeoutSeconds] [[-Destination] fo>] [-ProblemScript] [-DontIncludeServerLogs] []


DESCRIPTION
Collects debugging information in order to identify a problem in the work environment. The cmdlet runs a script tha
t reproduces the problem and captures any relevant information in a single .zip file. Then, you can send the .zip f
ile 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
-ProblemDescription
Write a description of the problem you want to capture in the error report bundle.

Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false

-ProblemScriptTimeoutSeconds
Specify a time period in seconds for which you want to wait for the script to run before considering it non-res
ponding.

Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false

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

Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false

-ProblemScript
Specify the script that reproduces the error that you want to report.

Required? true
Position? 4
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false

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

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
FileInfo


NOTES




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

C:\PS>$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." -De
stination 'D:\bug reports'


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






RELATED LINKS
Online version: http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/Get-ErrorReport.html