Windows Server 2012 R2 或 2016 无法安装 .Net 3.5.1

使用 Windows Server 2012 R2 或 Windows Server 2016系统,发现在安装 .net 3.5.1 时报错,报错内容如下:

1.jpg


可以通过如下 PowerShell 脚本进行安装:

从开始菜单中找到 PowerShell,右击选择 以管理员身份运行,注意是windows power shell 而不是cmd

输入如下脚本后回车执行:


Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU' -Name UseWUServer -Value 0
Restart-Service -Name wuauserv
Install-WindowsFeature Net-Framework-Core
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU' -Name UseWUServer -Value 1
Restart-Service -Name wuauserv


内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://sulao.cn/post/351.html

我要评论

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。