在使用Windows server 2016或2019系统添加角色和功能时,会出现安装.net 3.5失败问题;
此时,我们从 【开始】 菜单中找到 【PowerShell】,右键单击选择 【以管理员身份运行】。
输入如下内容后,按回车键执行
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
执行后,等待安装完成,此时需要等待一段时间
此时,我们可以查看到安装完毕
也可以在系统添加角色和功能,进行查看。