通过vmware API运行powershell时,获取退出代码0x80131029

问题描述 投票:0回答:1

通过VMware API运行Powershell时,我得到的退出代码为0x80131029。

enter image description here

无论如何,我是否可以通过Windows日志或任何其他方法找出此退出代码的原因?

powershell remote-access vsphere vmware-tools
1个回答
0
投票

使用以下功能,您可以获得(大多数)这些HRESULT值的描述:

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"
            }
        }
    }
}

根据您的情况:

Resolve-HResult 0x80131029

返回

Process exited due to Timeout escalation.

希望有所帮助

© www.soinside.com 2019 - 2024. All rights reserved.