“没有进程在管道的另一端”Write-Verbose Windows 10

时间:2015-09-28 22:45:40

标签: powershell windows-10 pipeline

当我运行PowerShell命令(构建我们的软件)时,我试图在我老板的计算机上解决错误。他是第一个运行Windows 10的开发人员。所有其他人仍然使用Win 8.1。

错误看起来Write-Verbose在Windows 10上无效。但我发现很难相信:

powershell.exe -NoLogo -NoProfile -NonInteractive -WindowStyle Hidden 
  -ExecutionPolicy RemoteSigned 
  -Command "Import-Module 'X:\ReleaseRoot\CompanyName\Deployment\CompanyName.Build' 
  -DisableNameChecking -Force; Generate-SvDeployManifest  " -verbose
Write-Verbose : The Win32 internal error "No process is on the other end of
  the pipe" 0xE9 occurred while getting console output buffer information. 
  Contact Microsoft Customer Support Services.
At X:\ReleaseRoot\CompanyName\Deployment\CompanyName.Build\Functions\Nuget\Restore-NugetPackages.ps1:23 char:9
  +       Write-Verbose "Restoring packages from $_"
  +       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  +  Category Info         : ResourceUnavailable: (:) [Write-Verbose], HostException
  +  FullyQualifiedErrorId : GetConsoleScreenBufferInfo,Microsoft.PowerShell.Commands.WriteVerboseCommand

失败的PowerShell功能非常简单:

function Restore-NugetPackages
{
  $packageConfigs = @("$RootFolder\Build\nuget\packages.config")

  $packageConfigs | ForEach {

    Write-Verbose "Restoring packages from $_"
    & $RootFolder\Build\nuget\nuget.exe restore $_ -PackagesDirectory "$RootFolder\Build\packages" | Write-Verbose

    # Output the versions of the nuget packages
    ([xml] ( Get-Content $_ )).packages.package | Select id, version
  }
}

此功能在Windows 8.1上完美运行。

我很难过。有线索吗?

1 个答案:

答案 0 :(得分:0)

他使用的是32位还是64位版本的powershell。与32位有一些不一致。似乎那些冗长的流不存在。