使用 Windows Server 2012 R2 或 Windows Server 2016系統,發如今安裝 .net 3.5.1 時報錯,報錯內容以下:html
找不到安裝源文件。post
能夠經過以下 PowerShell 腳本進行安裝:spa
輸入以下腳本後回車執行:.net
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU' -NameUseWUServer -Value 0
Restart-Service -Name wuauserv
Install-WindowsFeature Net-Framework-Core
Set-ItemProperty -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU' -NameUseWUServer -Value 1
Restart-Service -Name wuauserv