Dharmender Lodhi
Dharmender Lodhi

Reputation: 49

Getting exit code 0x80131029, when running powershell through vmware API

I am getting exit code as 0x80131029 when running powershell through VMware API.

enter image description here

Is there anyway I can find out the reason for this exit code through windows log or any other method?

Following cmdlets are being used:

Get-WMIObject

Get-ItemProperty

Get-CimInstance

Upvotes: 2

Views: 428

Answers (1)

Theo
Theo

Reputation: 61228

With below function you can get (most of) the descriptions for these HRESULT values:

function Resolve-HResult {
    param(
        [Parameter(Mandatory=$true, Position=0, ValueFromPipeline=$true)]
        [int32[]]$HResult
    )

    Process {
        foreach ($hr in $HResult) {
            $comEx = [System.Runtime.InteropServices.Marshal]::GetExceptionForHR($hr)
            if ($comEx) {
                $comEx.Message
            }
            else {
                Write-Error "$hr doesn't correspond to a known HResult"
            }
        }
    }
}

In your case:

Resolve-HResult 0x80131029

returns

Process exited due to Timeout escalation.

Hope that helps

Upvotes: 2

Related Questions