我正在尝试通过 PowerShell 会话以这种方式将 .NET Framework 4.5 安装到远程 Win2008R2 服务器(用户位于服务器管理员组中):
$session = New-PSSession -ComputerName $server -Credential Get-Credential
Invoke-Command -Session $session -ScriptBlock {Start-Process -FilePath "C:\temp\dotnetfx45_full_x86_x64.exe" -ArgumentList "/q /norestart" -Wait -PassThru}
然后我收到这个错误:
Executable: C:\temp\dotnetfx45_full_x86_x64.exe v4.5.50709.17929
--- logging level: standard ---
Successfully bound to the ClusApi.dll
Error 0x80070424: Failed to open the current cluster
Cluster drive map: ''
Considering drive: 'C:\'...
Drive 'C:\' has been selected as the largest fixed drive
Directory 'C:\aa113be049433424d2d3ca\' has been selected for file extraction
Extracting files to: C:\aa113be049433424d2d3ca\
Error 0x80004005: Failed to extract all files out of box container #0.
Error 0x80004005: Failed to extract
Exiting with result code: 0x80004005
=== Logging stopped: 2013/09/04 16:29:51 ===
如果我在服务器上本地运行命令 - 一切都正常。
Start-Process -FilePath "C:\temp\dotnetfx45_full_x86_x64.exe" `
-ArgumentList "/q /norestart" -Wait
答案1
我遇到了完全相同的问题,感觉很熟悉,所以我仔细回忆了一下,想起了上次我是如何修复它的。该问题是由 PS 远程会话可用的内存量限制引起的。本文向您展示如何查询它。如果您将其增加到 1GB,您应该能够毫无问题地安装 .NET 4.5。
答案2
尝试禁用任何防火墙和 AV。0x80004005 似乎对这些很常见。