Windows Server 2012 / 2016 安装 .Net Framework 3.5(PowerShell)

原文链接:https://www.muhanxue.com/essays/2017/04/3736598.html

问题描述

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

1

原因分析

找不到安装源文件。

解决办法

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

  1. 从开始菜单中找到 PowerShell,右击选择 以管理员身份运行。
  2. 输入如下脚本后回车执行:

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

未知意外

如果未顺利执行,请检查 “windows update 服务”是否能正常启动

posted on 2017-04-20 11:35  wuball  阅读(10146)  评论(1编辑  收藏  举报

导航