Error Category | Vmware PowerCLI Reference

Error Category

Cmdlets are usually implemented around resource operations. The four basic operations are CREATE, READ, UPDATE and DELETE. This set of operations is known as CRUD. Most of the cmdlets support CRUD which are respectively cmdlets that start with the New/Get/Set/Remove cmdlet verbs but they also may have additional operations

Step 1: Retrieve a object by running a Get command

You can READ objects by using Get-ErrorReport cmdlet. See example below:

# 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 $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"