使用Powershell远程安装.net 4

编程入门 行业动态 更新时间:2024-10-24 19:21:19
本文介绍了使用Powershell远程安装 4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我需要编写一个脚本,该脚本使用Powershell远程将 4安装到一组Server 2008 R2计算机上.我的脚本基于 social.technet.microsoft/Forums/zh-CN/winserverpowershell/thread/3045eb24-7739-4695-ae94-5aa7052119fd/.

I need to write a script that installs 4 remotely using powershell to a group of Server 2008 R2 machines. I based my script off of social.technet.microsoft/Forums/en-US/winserverpowershell/thread/3045eb24-7739-4695-ae94-5aa7052119fd/.

enter-pssession-计算机名localhost $ arglist ="/q/norestart/log C:\ Users \ tempuser \ Desktop \ dotnetfx4" $ filepath ="C:\ Users \ tempuser \ Desktop \ dotNetFx40_Full_setup.exe" 开始过程-FilePath $ filepath -ArgumentList $ arglist -Wait -PassThru

enter-pssession -computername localhost $arglist = "/q /norestart /log C:\Users\tempuser\Desktop\dotnetfx4" $filepath = "C:\Users\tempuser\Desktop\dotNetFx40_Full_setup.exe" Start-Process -FilePath $filepath -ArgumentList $arglist -Wait -PassThru

运行命令后,我将收到以下日志错误(在本地运行相同的行将安装而不会出现错误):

After running the command I would get the following log errors (running the same lines locally would install without error):

操作:下载项目 无法创建作业:hr = 0x80200014 动作:对所有项目执行动作 操作:在C:\ Users \ tempuser \ Desktop \ dotnetfx4 \ SetupUtility.exe上对Exe执行操作 Exe(C:\ Users \ tempuser \ Desktop \ dotnetfx4 \ SetupUtility.exe)成功. Exe日志文件:dd_SetupUtility.txt 动作完成 行动:ServiceControl-停止clr_optimization_v2.0.50727_32 ServiceControl操作成功! 动作完成 行动:ServiceControl-停止clr_optimization_v2.0.50727_64 ServiceControl操作成功! 动作完成 行动:在C:\ Users \ tempuser \ AppData \ Local \ Temp \ Microsoft .NET Framework 4 Setup_4.0.30319 \ Windows6.1-KB958488-v6001-x64.msu在Exe上执行行动 Exe(C:\ Users \ tempuser \ AppData \ Local \ Temp \ Microsoft .NET Framework 4 Setup_4.0.30319 \ Windows6.1-KB958488-v6001-x64.msu)失败,出现0x5-拒绝访问. . exe上的PerformOperation返回了退出代码5(转换为HRESULT = 0x5) 动作完成 OnFailureBehavior会回滚. 动作:对所有项目执行动作 动作完成 动作完成 行动:下载 go.microsoft/fwlink/?LinkId=164184&clcid=0x409 使用WinHttp WinHttpDetectAutoProxyConfigUrl失败,错误:12180 尽管WinHttpGetIEProxyConfigForCurrentUser成功调用,但无法检索代理信息 动作完成 C:\ Users \ tempuser \ AppData \ Local \ Temp \ Microsoft .NET Framework 4 Setup_4.0.30319 \ TMPF279.tmp.exe:验证netfx_Core.mzz的签名 C:\ Users \ tempuser \ AppData \ Local \ Temp \ Microsoft .NET Framework 4 Setup_4.0.30319 \ TMPF279.tmp.exe成功验证了netfx_Core.mzz的签名 动作完成 解压缩完成,代码为:16389 卸载有效负载失败:C:\ Users \ tempuser \ AppData \ Local \ Temp \ Microsoft .NET Framework 4 Setup_4.0.30319 \ netfx_Core.mzz 动作完成 最终结果:安装失败,错误代码:(0x80074005)(经过的时间:0 00:00:28).

Action: Downloading Item Failed to CreateJob : hr= 0x80200014 Action: Performing actions on all Items Action: Performing Action on Exe at C:\Users\tempuser\Desktop\dotnetfx4\SetupUtility.exe Exe (C:\Users\tempuser\Desktop\dotnetfx4\SetupUtility.exe) succeeded. Exe Log File: dd_SetupUtility.txt Action complete Action: ServiceControl - Stop clr_optimization_v2.0.50727_32 ServiceControl operation succeeded! Action complete Action: ServiceControl - Stop clr_optimization_v2.0.50727_64 ServiceControl operation succeeded! Action complete Action: Performing Action on Exe at C:\Users\tempuser\AppData\Local\Temp\Microsoft .NET Framework 4 Setup_4.0.30319\Windows6.1-KB958488-v6001-x64.msu Exe (C:\Users\tempuser\AppData\Local\Temp\Microsoft .NET Framework 4 Setup_4.0.30319\Windows6.1-KB958488-v6001-x64.msu) failed with 0x5 - Access is denied. . PerformOperation on exe returned exit code 5 (translates to HRESULT = 0x5) Action complete OnFailureBehavior for this item is to Rollback. Action: Performing actions on all Items Action complete Action complete Action: Downloading go.microsoft/fwlink/?LinkId=164184&clcid=0x409 using WinHttp WinHttpDetectAutoProxyConfigUrl failed with error: 12180 Unable to retrieve Proxy information although WinHttpGetIEProxyConfigForCurrentUser called succeeded Action complete C:\Users\tempuser\AppData\Local\Temp\Microsoft .NET Framework 4 Setup_4.0.30319\TMPF279.tmp.exe: Verifying signature for netfx_Core.mzz C:\Users\tempuser\AppData\Local\Temp\Microsoft .NET Framework 4 Setup_4.0.30319\TMPF279.tmp.exe Signature verified successfully for netfx_Core.mzz Action complete Decompression completed with code: 16389 Decompression of payload failed: C:\Users\tempuser\AppData\Local\Temp\Microsoft .NET Framework 4 Setup_4.0.30319\netfx_Core.mzz Action complete Final Result: Installation failed with error code: (0x80074005) (Elapsed time: 0 00:00:28).

任何帮助确定此问题的原因的方法都是很棒的.

Any help determinig the cause of this issue would be wonderful.

推荐答案

嗨JakeLa,

欢迎来到MSDN论坛.

我认为您遇到了一个如此棘手的问题.我想在这个话题中邀请更多的技术专家来帮助您解决此问题.从 从支持角度来看,这确实超出了我们在论坛中可以做到的范围.如果您无法在此处或自行确定答案,请考虑与我们一起提出支持案例.请访问此链接,以查看可以更好地使用的各种支持选项 满足您的需求: support.microsoft/default.aspx?id=fh;zh-cn;offerprophone

I think you encountered such a tough problem. I would like to involve another more technical expert in this thread to help you solve this problem. From a support perspective this is really beyond what we can do here in the forums. If you cannot determine your answer here or on your own, consider opening a support case with us. Visit this link to see the various support options that are available to better meet your needs: support.microsoft/default.aspx?id=fh;en-us;offerprophone

请等待响应.

如果您还有其他疑问,请感到免费让我们知道.

最好的问候,

更多推荐

使用Powershell远程安装.net 4

本文发布于:2023-11-12 07:24:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1580871.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Powershell   net

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!