原文连接:https://www.muhanxue.com/essays/2017/04/3736598.htmlhtml
使用 Windows Server 2012 R2 或 Windows Server 2016系统,发如今安装 .net 3.5.1 时报错,报错内容以下:windows
找不到安装源文件。spa
能够经过以下 PowerShell 脚本进行安装:.net
输入以下脚本后回车执行:code
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
若是未顺利执行,请检查 “windows update 服务”是否能正常启动htm