首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >windows 10 PowerShell Get-WindowsCapability和Add-WindowsCapability命令出错

windows 10 PowerShell Get-WindowsCapability和Add-WindowsCapability命令出错
EN

Stack Overflow用户
提问于 2018-12-25 05:26:42
回答 2查看 18.2K关注 0票数 3

我运行的是Windows 10专业版1809

我希望在计算机上安装active directory;但是,当我尝试使用powershell命令时:

代码语言:javascript
复制
Get-WindowsCapability -Name RSAT* -Online | Add-WindowsCapability -Online

我得到以下错误:

代码语言:javascript
复制
Add-WindowsCapability : Add-WindowsCapability failed. Error code = 0x800f0950
At line:1 char:45
+ ... WindowsCapability -Name RSAT* -Online | Add-WindowsCapability -Online
+                                             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Add-WindowsCapability], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.AddWindowsCapabilityCommand

同样值得注意的是该命令:

代码语言:javascript
复制
Get-WindowsCapability -Name RSAT* -Online | Select-Object -Property DisplayName, State

显示以下内容:

代码语言:javascript
复制
DisplayName                                                                          State
-----------                                                                          -----
RSAT: Active Directory Domain Services and Lightweight Directory Services Tools NotPresent
RSAT: BitLocker Drive Encryption Administration Utilities                       NotPresent
RSAT: Active Directory Certificate Services Tools                               NotPresent
RSAT: DHCP Server Tools                                                         NotPresent
RSAT: DNS Server Tools                                                          NotPresent
RSAT: Failover Clustering Tools                                                 NotPresent
RSAT: File Services Tools                                                       NotPresent
RSAT: Group Policy Management Tools                                             NotPresent
RSAT: IP Address Management (IPAM) Client                                       NotPresent
RSAT: Data Center Bridging LLDP Tools                                           NotPresent
RSAT: Network Controller Management Tools                                       NotPresent
RSAT: Network Load Balancing Tools                                              NotPresent
RSAT: Remote Access Management Tools                                            NotPresent
RSAT: Remote Desktop Services Tools                                             NotPresent
RSAT: Server Manager                                                            NotPresent
RSAT: Shielded VM Tools                                                         NotPresent
RSAT: Storage Migration Service Management Tools                                NotPresent
RSAT: Storage Replica Module for Windows PowerShell                             NotPresent
RSAT: System Insights Module for Windows PowerShell                             NotPresent
RSAT: Volume Activation Tools                                                   NotPresent
RSAT: Windows Server Update Services Tools                                      NotPresent
EN

回答 2

Stack Overflow用户

发布于 2019-06-07 23:49:13

试试这个:

使用管理员权限打开Powershell,并添加以下内容:

将Windows Update服务器密钥设置为0

代码语言:javascript
复制
Set-ItemProperty -Path HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name UseWUServer -Value 0

重新启动Windows Update Service

代码语言:javascript
复制
Restart-Service -Name wuauserv -Force

获取RSAT工具

代码语言:javascript
复制
Get-WindowsCapability -Name RSAT* -Online | Add-WindowsCapability -Online

将Windows Update服务器密钥设置为%1

代码语言:javascript
复制
Set-ItemProperty -Path HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name UseWUServer -Value 1

重新启动Windows Update Service

代码语言:javascript
复制
Restart-Service -Name wuauserv -Force

完成

票数 5
EN

Stack Overflow用户

发布于 2018-12-25 16:12:09

显然,错误代码0x800f0950意味着“没有足够的源码来安装某些东西”,这可能是因为一个或多个RSAT工具需要安装额外的源码的.NET 3.5。请检查您是否已安装.NET 3.5,如果未安装,请安装它,然后再次运行RSAT安装。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53917787

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档