gpt4 book ai didi

powershell - Windows 10 PowerShell Get-WindowsCapability 和 Add-WindowsCapability 命令出错

转载 作者:行者123 更新时间:2023-12-02 23:36:28 25 4
gpt4 key购买 nike

我正在运行 Windows 10 专业版 1809
我希望在计算机上安装事件目录;但是,当我尝试使用 powershell 命令时:

Get-WindowsCapability -Name RSAT* -Online | Add-WindowsCapability -Online

我收到以下错误:
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

还值得注意的是命令:
Get-WindowsCapability -Name RSAT* -Online | Select-Object -Property DisplayName, State

显示以下内容:
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

最佳答案

尝试这个:

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

将 Windows 更新服务器 key 设置为 0

Set-ItemProperty -Path HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name UseWUServer -Value 0

重新启动 Windows 更新服务
Restart-Service -Name wuauserv -Force

获取 RSAT 工具
Get-WindowsCapability -Name RSAT* -Online | Add-WindowsCapability -Online

将 Windows 更新服务器 key 设置为 1
Set-ItemProperty -Path HKLM:SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU -Name UseWUServer -Value 1

重新启动 Windows 更新服务
Restart-Service -Name wuauserv -Force

完毕

关于powershell - Windows 10 PowerShell Get-WindowsCapability 和 Add-WindowsCapability 命令出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53917787/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com