在Windows10中 PowerShell ,你可以使用以下Get-WindowsFeature命令查看已安装功能组件的列表,来查询 Windows 组件功能;Get-WindowsFeature 和 dism /online /get-features 都是用于查看和管理系统功能的命令,但它们的工作方式和显示的信息有所不同。下面是它们的主要区别:

Get-WindowsFeaturedism /online /get-features 都是用于查看和管理系统功能的命令,但它们的工作方式和显示的信息有所不同。下面是它们的主要区别:

1. Get-WindowsFeature 命令

  • 用途:这是 PowerShell 中的一个命令,专门用于列出当前 Windows Server 中已安装的角色和功能。

  • 功能:该命令显示系统角色、功能的详细信息,包括它们的名称、描述、安装状态等。

  • 输出:提供一个可读性较强的输出,通常以表格的形式显示角色、功能及其状态。

  • 应用场景:适用于 Windows Server,尤其是在管理 Windows Server 角色和功能时。比如,查看是否安装了某个特定的角色或功能。

    示例命令

    powershell
    Get-WindowsFeature

    示例输出

     
    Display Name                                    Name                     Install State
    ------------                                    ----                     -------------
    Web Server (IIS)                                Web-Server               Installed
    File Server                                    FS-FileServer            Installed
    DNS Server                                     DNS-Server               Available
  • 特点:这个命令只显示与 Windows Server 角色和功能相关的内容,不包括所有组件。如果你需要管理 Windows Server 中的角色、功能或特性,这个命令是推荐的。


2. dism /online /get-features 命令

  • 用途:这是 DISM (Deployment Imaging Service and Management Tool) 工具中的一个命令,主要用于显示 Windows 中所有组件功能的列表,包括所有的功能和特性(不仅仅是角色)。

  • 功能:显示 Windows 系统中所有可用和已安装的功能(包括客户端和服务器版本),可以获取更多细节信息,特别是与操作系统组件相关的功能。

  • 输出:以列表的形式输出所有功能,包含每个功能的 名称、状态描述

  • 应用场景:适用于 Windows 系统(不仅限于服务器),你可以在 Windows 的客户端版本和服务器版本中使用它。这个命令不仅列出角色和功能,还可以显示系统的其他底层功能和可用选项。

    示例命令

    cmd
    dism /online /get-features

    示例输出

     
    Feature Name      : Microsoft-Windows-Subsystem-Linux
    State             : Disabled
    
    Feature Name      : NetFx3
    State             : Enabled
  • 特点dism 提供的信息更加细致,不仅局限于角色和功能,还包括其他操作系统组件功能。如果你需要更全面的系统组件管理,dism 是一个更强大的工具。


3. 总结比较

功能 Get-WindowsFeature dism /online /get-features
工具类型 PowerShell 命令 DISM 工具命令
查看范围 仅限于 Windows Server 角色和功能 显示所有 Windows 功能和特性,包括客户端和服务器功能
输出形式 表格形式,易于理解 列表形式,提供详细的功能信息和描述
适用场景 管理和查看 Windows Server 角色和功能 查看和管理所有 Windows 系统组件功能

4. 何时使用哪个命令

  • 使用 Get-WindowsFeature 时,适用于 Windows Server 环境,特别是查看与角色和功能相关的内容。
  • 使用 dism /online /get-features 时,适用于全面管理系统功能,包括客户端和服务器版本的功能。

Get-WindowsFeature查看已安装功能组件的列表

显示名称
(Display Name)
名称
(Name)
安装状态
(Install State)

PS C:\Users\Administrator> Get-WindowsFeature

 

Display Name                                            Name                       Install State
------------                                            ----                       -------------
[ ] Active Directory Rights Management Services         ADRMS                          Available
    [ ] Active Directory 权限管理服务器                        ADRMS-Server                   Available
    [ ] 联合身份验证支持                                        ADRMS-Identity                 Available
[ ] Active Directory 联合身份验证服务                           ADFS-Federation                Available
[ ] Active Directory 轻型目录服务                             ADLDS                          Available
[ ] Active Directory 域服务                                AD-Domain-Services             Available
[ ] Active Directory 证书服务                               AD-Certificate                 Available
    [ ] 证书颁发机构                                          ADCS-Cert-Authority            Available
    [ ] 联机响应程序                                          ADCS-Online-Cert               Available
    [ ] 网络设备注册服务                                        ADCS-Device-Enrollment         Available
    [ ] 证书颁发机构 Web 注册                                   ADCS-Web-Enrollment            Available
    [ ] 证书注册 Web 服务                                     ADCS-Enroll-Web-Svc            Available
    [ ] 证书注册策略 Web 服务                                   ADCS-Enroll-Web-Pol            Available
[ ] DHCP 服务器                                            DHCP                           Available
[ ] DNS 服务器                                             DNS                            Available
[ ] Hyper-V                                             Hyper-V                        Available
[ ] Web 服务器(IIS)                                        Web-Server                     Available
    [ ] Web 服务器                                         Web-WebServer                  Available
        [ ] 安全性                                         Web-Security                   Available
            [ ] 请求筛选                                    Web-Filtering                  Available
            [ ] IIS 客户端证书映射身份验证                         Web-Cert-Auth                  Available
            [ ] IP 和域限制                                 Web-IP-Security                Available
            [ ] URL 授权                                  Web-Url-Auth                   Available
            [ ] Windows 身份验证                            Web-Windows-Auth               Available
            [ ] 基本身份验证                                  Web-Basic-Auth                 Available
            [ ] 集中式 SSL 证书支持                            Web-CertProvider               Available
            [ ] 客户端证书映射身份验证                             Web-Client-Auth                Available
            [ ] 摘要式身份验证                                 Web-Digest-Auth                Available
        [ ] 常见 HTTP 功能                                  Web-Common-Http                Available
            [ ] HTTP 错误                                 Web-Http-Errors                Available
            [ ] 静态内容                                    Web-Static-Content             Available
            [ ] 默认文档                                    Web-Default-Doc                Available
            [ ] 目录浏览                                    Web-Dir-Browsing               Available
            [ ] HTTP 重定向                                Web-Http-Redirect              Available
            [ ] WebDAV 发布                               Web-DAV-Publishing             Available
        [ ] 性能                                          Web-Performance                Available
            [ ] 静态内容压缩                                  Web-Stat-Compression           Available
            [ ] 动态内容压缩                                  Web-Dyn-Compression            Available
        [ ] 运行状况和诊断                                     Web-Health                     Available
            [ ] HTTP 日志记录                               Web-Http-Logging               Available
            [ ] ODBC 日志记录                               Web-ODBC-Logging               Available
            [ ] 跟踪                                      Web-Http-Tracing               Available
            [ ] 请求监视器                                   Web-Request-Monitor            Available
            [ ] 日志记录工具                                  Web-Log-Libraries              Available
            [ ] 自定义日志                                   Web-Custom-Logging             Available
        [ ] 应用程序开发                                      Web-App-Dev                    Available
            [ ] .NET Extensibility 3.5                  Web-Net-Ext                    Available
            [ ] .NET Extensibility 4.8                  Web-Net-Ext45                  Available
            [ ] ASP                                     Web-ASP                        Available
            [ ] ASP.NET 3.5                             Web-Asp-Net                    Available
            [ ] ASP.NET 4.8                             Web-Asp-Net45                  Available
            [ ] CGI                                     Web-CGI                        Available
            [ ] ISAPI 扩展                                Web-ISAPI-Ext                  Available
            [ ] ISAPI 筛选器                               Web-ISAPI-Filter               Available
            [ ] WebSocket 协议                            Web-WebSockets                 Available
            [ ] 服务器端包含                                  Web-Includes                   Available
            [ ] 应用程序初始化                                 Web-AppInit                    Available
    [ ] FTP 服务器                                         Web-Ftp-Server                 Available
        [ ] FTP 服务                                      Web-Ftp-Service                Available
        [ ] FTP 扩展                                      Web-Ftp-Ext                    Available
    [ ] 管理工具                                            Web-Mgmt-Tools                 Available
        [ ] IIS 管理控制台                                   Web-Mgmt-Console               Available
        [ ] IIS 6 管理兼容性                                 Web-Mgmt-Compat                Available
            [ ] IIS 6 元数据库兼容性                           Web-Metabase                   Available
            [ ] IIS 6 WMI 兼容性                           Web-WMI                        Available
            [ ] IIS 6 管理控制台                             Web-Lgcy-Mgmt-Console          Available
            [ ] IIS 6 脚本工具                              Web-Lgcy-Scripting             Available
        [ ] IIS 管理脚本和工具                                 Web-Scripting-Tools            Available
        [ ] 管理服务                                        Web-Mgmt-Service               Available
[ ] Windows Deployment Services                         WDS                            Available
    [ ] Deployment Server                               WDS-Deployment                 Available
    [ ] Transport Server                                WDS-Transport                  Available
[ ] Windows Server 更新服务                                 UpdateServices                 Available
    [ ] WID Connectivity                                UpdateServices-WidDB           Available
    [ ] WSUS 服务                                         UpdateServices-Services        Available
    [ ] SQL Server Connectivity                         UpdateServices-DB              Available
[ ] 传真服务器                                               Fax                            Available
[ ] 打印和文件服务                                             Print-Services                 Available
    [ ] 打印服务器                                           Print-Server                   Available
    [ ] Internet 打印                                     Print-Internet                 Available
    [ ] LPD 服务                                          Print-LPD-Service              Available
[ ] 批量激活服务                                              VolumeActivation               Available
[ ] 设备运行状况证明                                            DeviceHealthAttestat...        Available
[ ] 网络策略和访问服务                                           NPAS                           Available
[ ] 网络控制器                                               NetworkController              Available
[X] 文件和存储服务                                             FileAndStorage-Services        Installed
    [X] 存储服务                                            Storage-Services               Installed
    [ ] 文件和 iSCSI 服务                                    File-Services                  Available
        [ ] 文件服务器                                       FS-FileServer                  Available
        [ ] DFS 复制                                      FS-DFS-Replication             Available
        [ ] DFS 命名空间                                    FS-DFS-Namespace               Available
        [ ] iSCSI 目标存储提供程序(VDS 和 VSS 硬件提供程序)            iSCSITarget-VSS-VDS            Available
        [ ] iSCSI 目标服务器                                 FS-iSCSITarget-Server          Available
        [ ] NFS 服务器                                     FS-NFS-Service                 Available
        [ ] 工作文件夹                                       FS-SyncShareService            Available
        [ ] 网络文件 BranchCache                            FS-BranchCache                 Available
        [ ] 文件服务器 VSS 代理服务                              FS-VSS-Agent                   Available
        [ ] 文件服务器资源管理器                                  FS-Resource-Manager            Available
        [ ] 重复数据删除                                      FS-Data-Deduplication          Available
[ ] 远程访问                                                RemoteAccess                   Available
    [ ] DirectAccess 和 VPN (RAS)                        DirectAccess-VPN               Available
    [ ] Web 应用程序代理                                      Web-Application-Proxy          Available
    [ ] 路由                                              Routing                        Available
[ ] 远程桌面服务                                              Remote-Desktop-Services        Available
    [ ] 远程桌面 Web 访问                                     RDS-Web-Access                 Available
    [ ] 远程桌面会话主机                                        RDS-RD-Server                  Available
    [ ] 远程桌面连接代理                                        RDS-Connection-Broker          Available
    [ ] 远程桌面授权                                          RDS-Licensing                  Available
    [ ] 远程桌面网关                                          RDS-Gateway                    Available
    [ ] 远程桌面虚拟化主机                                       RDS-Virtualization             Available
[ ] 主机保护者服务                                             HostGuardianServiceRole        Available
[X] .NET Framework 3.5 功能                               NET-Framework-Features         Installed
    [X] .NET Framework 3.5 (包括 .NET 2.0 和 3.0)          NET-Framework-Core             Installed
    [ ] HTTP 激活                                         NET-HTTP-Activation            Available
    [ ] 非 HTTP 激活                                       NET-Non-HTTP-Activ             Available
[X] .NET Framework 4.8 Features                         NET-Framework-45-Fea...        Installed
    [X] .NET Framework 4.8                              NET-Framework-45-Core          Installed
    [ ] ASP.NET 4.8                                     NET-Framework-45-ASPNET        Available
    [X] WCF 服务                                          NET-WCF-Services45             Installed
        [ ] HTTP 激活                                     NET-WCF-HTTP-Activat...        Available
        [X] TCP 端口共享                                    NET-WCF-TCP-PortShar...        Installed
        [ ] TCP 激活                                      NET-WCF-TCP-Activati...        Available
        [ ] 命名管道激活                                      NET-WCF-Pipe-Activat...        Available
        [ ] 消息队列(MSMQ)激活                                NET-WCF-MSMQ-Activat...        Available
[X] Azure Arc Setup                                     AzureArcSetup                  Installed
[ ] BitLocker 驱动器加密                                     BitLocker                      Available
[ ] BitLocker 网络解锁                                      BitLocker-NetworkUnlock        Available
[ ] BranchCache                                         BranchCache                    Available
[ ] DirectPlay                                          Direct-Play                    Available
[ ] Enhanced Storage                                    EnhancedStorage                Available
[ ] HTTP 代理上的 RPC                                       RPC-over-HTTP-Proxy            Available
[ ] I/O 服务质量                                            DiskIo-QoS                     Available
[ ] IIS 可承载 Web 核心                                      Web-WHC                        Available
[ ] Internet 打印客户端                                      Internet-Print-Client          Available
[ ] IP 地址管理(IPAM)服务器                                    IPAM                           Available
[ ] LPR 端口监视器                                           LPR-Port-Monitor               Available
[X] Microsoft Defender 防病毒                              Windows-Defender               Installed
[ ] MultiPoint Connector                                MultiPoint-Connector           Available
    [ ] MultiPoint Connector Services                   MultiPoint-Connector...        Available
    [ ] MultiPoint 管理器和 MultiPoint 仪表板                  MultiPoint-Tools               Available
[ ] NFS 客户端                                             NFS-Client                     Available
[ ] RAS 连接管理器管理工具包(CMAK)                                CMAK                           Available
[ ] SMB 1.0/CIFS 文件共享支持                                 FS-SMB1                        Available
    [ ] SMB 1.0/CIFS 服务器                                FS-SMB1-SERVER                 Available
    [ ] SMB 1.0/CIFS 客户端                                FS-SMB1-CLIENT                 Available
[ ] SMB 带宽限制                                            FS-SMBBW                       Available
[ ] SMTP 服务器                                            SMTP-Server                    Available
[ ] SNMP 服务                                             SNMP-Service                   Available
    [ ] SNMP WMI 提供程序                                   SNMP-WMI-Provider              Available
[ ] Telnet 客户端                                          Telnet-Client                  Available
[ ] TFTP 客户端                                            TFTP-Client                    Available
[ ] WebDAV 重定向程序                                        WebDAV-Redirector              Available
[ ] Windows Biometric Framework                         Biometric-Framework            Available
[ ] Windows Identity Foundation 3.5                     Windows-Identity-Fou...        Available
[X] Windows PowerShell                                  PowerShellRoot                 Installed
    [X] Windows PowerShell 5.1                          PowerShell                     Installed
    [X] Windows PowerShell 2.0 Engine                   PowerShell-V2                  Installed
    [ ] Windows PowerShell Desired State Configurati... DSC-Service                    Available
    [ ] Windows PowerShell Web 访问                       WindowsPowerShellWeb...        Available
[ ] Windows Process Activation Service                  WAS                            Available
    [ ] 进程模型                                            WAS-Process-Model              Available
    [ ] .NET Environment 3.5                            WAS-NET-Environment            Available
    [ ] 配置 API                                          WAS-Config-APIs                Available
[ ] Windows Search 服务                                   Search-Service                 Available
[ ] Windows Server Migration Tools                      Migration                      Available
[ ] Windows Server 备份                                   Windows-Server-Backup          Available
[ ] Windows Subsystem for Linux                         Microsoft-Windows-Su...        Available
[ ] Windows TIFF IFilter                                Windows-TIFF-IFilter           Available
[ ] Windows 内部数据库                                       Windows-Internal-Dat...        Available
[ ] WinRM IIS 扩展                                        WinRM-IIS-Ext                  Available
[ ] WINS 服务器                                            WINS                           Available
[X] WoW64 支持                                            WoW64-Support                  Installed
[X] XPS Viewer                                          XPS-Viewer                     Installed
[ ] 安装与启动事件集合                                           Setup-and-Boot-Event...        Available
[ ] 存储副本                                                Storage-Replica                Available
[ ] 存储迁移服务                                              SMS                            Available
[ ] 存储迁移服务代理                                            SMS-Proxy                      Available
[ ] 对等名称解析协议                                            PNRP                           Available
[ ] 多路径 I/O                                             Multipath-IO                   Available
[ ] 故障转移群集                                              Failover-Clustering            Available
[ ] 管理 OData IIS 扩展                                     ManagementOdata                Available
[ ] 后台智能传输服务(BITS)                                      BITS                           Available
    [ ] IIS 服务器扩展                                       BITS-IIS-Ext                   Available
    [ ] Compact 服务器                                     BITS-Compact-Server            Available
[ ] 基于 Windows 标准的存储管理                                  WindowsStorageManage...        Available
[ ] 简单 TCP/IP 服务                                        Simple-TCPIP                   Available
[ ] 媒体基础                                                Server-Media-Foundation        Available
[ ] 容器                                                  Containers                     Available
[ ] 软件负载平衡器                                             SoftwareLoadBalancer           Available
[ ] 数据中心桥接                                              Data-Center-Bridging           Available
[ ] 网络负载平衡                                              NLB                            Available
[ ] 网络虚拟化                                               NetworkVirtualization          Available
[X] 无线 LAN 服务                                           Wireless-Networking            Installed
[ ] 系统见解                                                System-Insights                Available
[X] 系统数据存档工具                                            System-DataArchiver            Installed
[ ] 消息队列                                                MSMQ                           Available
    [ ] 消息队列服务                                          MSMQ-Services                  Available
        [ ] 消息队列服务器                                     MSMQ-Server                    Available
        [ ] HTTP 支持                                     MSMQ-HTTP-Support              Available
        [ ] 多播支持                                        MSMQ-Multicasting              Available
        [ ] 路由服务                                        MSMQ-Routing                   Available
        [ ] 目录服务集成                                      MSMQ-Directory                 Available
        [ ] 消息队列触发器                                     MSMQ-Triggers                  Available
    [ ] 消息队列 DCOM 代理                                    MSMQ-DCOM                      Available
[ ] 用于结构管理的 VM 防护工具                                     FabricShieldedTools            Available
[X] 优质 Windows 音频视频体验                                   qWave                          Installed
[ ] 远程差分压缩                                              RDC                            Available
[X] 远程服务器管理工具                                           RSAT                           Installed
    [X] 功能管理工具                                          RSAT-Feature-Tools             Installed
        [ ] SMTP 服务器工具                                  RSAT-SMTP                      Available
        [ ] BitLocker 驱动器加密管理实用程序                       RSAT-Feature-Tools-B...        Available
            [ ] BitLocker 恢复密码查看器                       RSAT-Feature-Tools-B...        Available
            [ ] BitLocker 驱动器加密工具                       RSAT-Feature-Tools-B...        Available
        [ ] BITS 服务器扩展工具                                RSAT-Bits-Server               Available
        [ ] DataCenterBridging LLDP Tools               RSAT-DataCenterBridg...        Available
        [ ] IP 地址管理(IPAM)客户端                            IPAM-Client-Feature            Available
        [ ] SNMP 工具                                     RSAT-SNMP                      Available
        [ ] WINS 服务器工具                                  RSAT-WINS                      Available
        [ ] 存储迁移服务工具                                    RSAT-SMS                       Available
        [X] 故障转移群集工具                                    RSAT-Clustering                Installed
            [ ] Windows PowerShell 的故障转移群集模块            RSAT-Clustering-Powe...        Available
            [ ] 故障转移群集管理工具                              RSAT-Clustering-Mgmt           Available
            [ ] 故障转移群集命令接口                              RSAT-Clustering-CmdI...        Available
            [X] 故障转移群集自动化服务器                            RSAT-Clustering-Auto...        Installed
        [ ] 适用于 Windows PowerShell 的系统见解模块              RSAT-System-Insights           Available
        [ ] 受防护的 VM 工具                                  RSAT-Shielded-VM-Tools         Available
        [ ] 网络负载平衡工具                                    RSAT-NLB                       Available
        [ ] 用于 Windows PowerShell 的存储副本模块               RSAT-Storage-Replica           Available
    [ ] 角色管理工具                                          RSAT-Role-Tools                Available
        [ ] AD DS 和 AD LDS 工具                           RSAT-AD-Tools                  Available
            [ ] AD DS 工具                                RSAT-ADDS                      Available
                [ ] Active Directory 管理中心               RSAT-AD-AdminCenter            Available
                [ ] AD DS 管理单元和命令行工具                    RSAT-ADDS-Tools                Available
            [ ] AD LDS 管理单元和命令行工具                       RSAT-ADLDS                     Available
            [ ] Windows PowerShell 的 Active Director... RSAT-AD-PowerShell             Available
        [ ] Hyper-V 管理工具                                RSAT-Hyper-V-Tools             Available
            [ ] Hyper-V GUI 管理工具                        Hyper-V-Tools                  Available
            [ ] Windows PowerShell 的 Hyper-V 模块         Hyper-V-PowerShell             Available
        [ ] Windows Server Update Services 工具           UpdateServices-RSAT            Available
            [ ] API 和 PowerShell cmdlet                 UpdateServices-API             Available
            [ ] 用户界面管理控制台                               UpdateServices-UI              Available
        [ ] 远程桌面服务工具                                    RSAT-RDS-Tools                 Available
            [ ] 远程桌面授权工具                                RDS-Licensing-UI               Available
            [ ] 远程桌面网关工具                                RSAT-RDS-Gateway               Available
            [ ] 远程桌面许可诊断程序                              RSAT-RDS-Licensing-D...        Available
        [ ] Active Directory Rights Management Servi... RSAT-ADRMS                     Available
        [ ] Active Directory 证书服务工具                     RSAT-ADCS                      Available
            [ ] 联机响应程序工具                                RSAT-Online-Responder          Available
            [ ] 证书颁发机构管理工具                              RSAT-ADCS-Mgmt                 Available
        [ ] DHCP 服务器工具                                  RSAT-DHCP                      Available
        [ ] DNS 服务器工具                                   RSAT-DNS-Server                Available
        [ ] Windows Deployment Services Tools           WDS-AdminPack                  Available
        [ ] 传真服务器工具                                     RSAT-Fax                       Available
        [ ] 打印和文件服务工具                                   RSAT-Print-Services            Available
        [ ] 批量激活工具                                      RSAT-VA-Tools                  Available
        [ ] 网络策略和访问服务工具                                 RSAT-NPAS                      Available
        [ ] 网络控制器管理工具                                   RSAT-NetworkController         Available
        [ ] 文件服务工具                                      RSAT-File-Services             Available
            [ ] DFS 管理工具                                RSAT-DFS-Mgmt-Con              Available
            [ ] 网络文件系统服务管理工具                            RSAT-NFS-Admin                 Available
            [ ] 文件服务器资源管理器工具                            RSAT-FSRM-Mgmt                 Available
        [ ] 远程访问管理工具                                    RSAT-RemoteAccess              Available
            [ ] 用于 Windows PowerShell 的远程访问模块           RSAT-RemoteAccess-Po...        Available
            [ ] 远程访问 GUI 和命令行工具                         RSAT-RemoteAccess-Mgmt         Available
[ ] 远程协助                                                Remote-Assistance              Available
[ ] 主机保护者 Hyper-V 支持                                    HostGuardian                   Available
[ ] 组策略管理                                               GPMC                           Available

 

在Windows10中 PowerShell ,你可以使用以下命令来查询 Windows 组件功能:

powershell
Get-WindowsOptionalFeature -Online
这个命令会列出当前已安装的 Windows 组件功能以及可用的但尚未安装的功能。

功能名称
(FeatureName)
状态
(State)

 

PS C:\Users\Administrator> Get-WindowsOptionalFeature -Online


FeatureName : Server-Core
State       : Enabled

FeatureName : NetFx4ServerFeatures
State       : Enabled

FeatureName : NetFx4
State       : Enabled

FeatureName : NetFx4Extended-ASPNET45
State       : Disabled

FeatureName : WCF-Services45
State       : Enabled

FeatureName : WCF-HTTP-Activation45
State       : Disabled

FeatureName : WCF-TCP-Activation45
State       : Disabled

FeatureName : WCF-Pipe-Activation45
State       : Disabled

FeatureName : WCF-MSMQ-Activation45
State       : Disabled

FeatureName : WCF-TCP-PortSharing45
State       : Enabled

FeatureName : ManagementOdata
State       : Disabled

FeatureName : DSC-Service
State       : Disabled

FeatureName : DeviceHealthAttestationService
State       : Disabled

FeatureName : IPAMServerFeature
State       : Disabled

FeatureName : RightsManagementServices-Role
State       : Disabled

FeatureName : RightsManagementServices
State       : Disabled

FeatureName : RMS-Federation
State       : Disabled

FeatureName : RightsManagementServices-AdminTools
State       : Disabled

FeatureName : ADCertificateServicesRole
State       : Disabled

FeatureName : CertificateServices
State       : Disabled

FeatureName : OnlineRevocationServices
State       : Disabled

FeatureName : WebEnrollmentServices
State       : Disabled

FeatureName : NetworkDeviceEnrollmentServices
State       : Disabled

FeatureName : CertificateEnrollmentPolicyServer
State       : Disabled

FeatureName : CertificateEnrollmentServer
State       : Disabled

FeatureName : HostGuardianService-Package
State       : Disabled

FeatureName : Web-Application-Proxy
State       : Disabled

FeatureName : IdentityServer-SecurityTokenService
State       : Disabled

FeatureName : NetworkController
State       : Disabled

FeatureName : ActiveDirectory-PowerShell
State       : Disabled

FeatureName : DirectoryServices-AdministrativeCenter
State       : Disabled

FeatureName : DirectoryServices-DomainController
State       : Disabled

FeatureName : DirectoryServices-ISM-Smtp
State       : Disabled

FeatureName : AuthManager
State       : Disabled

FeatureName : IPAMClientFeature
State       : Disabled

FeatureName : WebAccess
State       : Disabled

FeatureName : FSRM-Infrastructure
State       : Disabled

FeatureName : Microsoft-Windows-FCI-Client-Package
State       : Disabled

FeatureName : UpdateServices-RSAT
State       : Disabled

FeatureName : UpdateServices-API
State       : Disabled

FeatureName : UpdateServices-UI
State       : Disabled

FeatureName : UpdateServices
State       : Disabled

FeatureName : UpdateServices-Services
State       : Disabled

FeatureName : UpdateServices-Database
State       : Disabled

FeatureName : UpdateServices-WidDatabase
State       : Disabled

FeatureName : MicrosoftWindowsPowerShellRoot
State       : Enabled

FeatureName : MicrosoftWindowsPowerShell
State       : Enabled

FeatureName : iSCSITargetServer-PowerShell
State       : Disabled

FeatureName : PKIClient-PSH-Cmdlets
State       : Disabled

FeatureName : Tpm-PSH-Cmdlets
State       : Enabled

FeatureName : MicrosoftWindowsPowerShellV2
State       : Enabled

FeatureName : KeyDistributionService-PSH-Cmdlets
State       : Enabled

FeatureName : TlsSessionTicketKey-PSH-Cmdlets
State       : Enabled

FeatureName : RemoteAccessMgmtTools
State       : Disabled

FeatureName : RemoteAccessPowerShell
State       : Disabled

FeatureName : RasServerAdminTools
State       : Disabled

FeatureName : DamgmtTools
State       : Disabled

FeatureName : DataCenterBridging-LLDP-Tools
State       : Disabled

FeatureName : WindowsPowerShellWebAccess
State       : Disabled

FeatureName : NetworkControllerTools
State       : Disabled

FeatureName : Server-Psh-Cmdlets
State       : Enabled

FeatureName : RemoteAccess
State       : Disabled

FeatureName : RemoteAccessServer
State       : Disabled

FeatureName : RasRoutingProtocols
State       : Disabled

FeatureName : IIS-WebServerRole
State       : Disabled

FeatureName : IIS-WebServer
State       : Disabled

FeatureName : IIS-CommonHttpFeatures
State       : Disabled

FeatureName : IIS-Security
State       : Disabled

FeatureName : IIS-RequestFiltering
State       : Disabled

FeatureName : IIS-StaticContent
State       : Disabled

FeatureName : IIS-DefaultDocument
State       : Disabled

FeatureName : IIS-DirectoryBrowsing
State       : Disabled

FeatureName : IIS-HttpErrors
State       : Disabled

FeatureName : IIS-HttpRedirect
State       : Disabled

FeatureName : IIS-WebDAV
State       : Disabled

FeatureName : IIS-ApplicationDevelopment
State       : Disabled

FeatureName : IIS-WebSockets
State       : Disabled

FeatureName : IIS-ApplicationInit
State       : Disabled

FeatureName : IIS-NetFxExtensibility
State       : Disabled

FeatureName : IIS-NetFxExtensibility45
State       : Disabled

FeatureName : IIS-ISAPIExtensions
State       : Disabled

FeatureName : IIS-ISAPIFilter
State       : Disabled

FeatureName : IIS-ASPNET
State       : Disabled

FeatureName : IIS-ASPNET45
State       : Disabled

FeatureName : IIS-ASP
State       : Disabled

FeatureName : IIS-CGI
State       : Disabled

FeatureName : IIS-ServerSideIncludes
State       : Disabled

FeatureName : IIS-HealthAndDiagnostics
State       : Disabled

FeatureName : IIS-HttpLogging
State       : Disabled

FeatureName : IIS-LoggingLibraries
State       : Disabled

FeatureName : IIS-RequestMonitor
State       : Disabled

FeatureName : IIS-HttpTracing
State       : Disabled

FeatureName : IIS-CustomLogging
State       : Disabled

FeatureName : IIS-ODBCLogging
State       : Disabled

FeatureName : IIS-CertProvider
State       : Disabled

FeatureName : IIS-BasicAuthentication
State       : Disabled

FeatureName : IIS-WindowsAuthentication
State       : Disabled

FeatureName : IIS-DigestAuthentication
State       : Disabled

FeatureName : IIS-ClientCertificateMappingAuthentication
State       : Disabled

FeatureName : IIS-IISCertificateMappingAuthentication
State       : Disabled

FeatureName : IIS-URLAuthorization
State       : Disabled

FeatureName : IIS-IPSecurity
State       : Disabled

FeatureName : IIS-Performance
State       : Disabled

FeatureName : IIS-HttpCompressionStatic
State       : Disabled

FeatureName : IIS-HttpCompressionDynamic
State       : Disabled

FeatureName : IIS-WebServerManagementTools
State       : Disabled

FeatureName : IIS-ManagementConsole
State       : Disabled

FeatureName : IIS-LegacySnapIn
State       : Disabled

FeatureName : IIS-ManagementScriptingTools
State       : Disabled

FeatureName : IIS-ManagementService
State       : Disabled

FeatureName : IIS-IIS6ManagementCompatibility
State       : Disabled

FeatureName : IIS-Metabase
State       : Disabled

FeatureName : IIS-WMICompatibility
State       : Disabled

FeatureName : IIS-LegacyScripts
State       : Disabled

FeatureName : IIS-FTPServer
State       : Disabled

FeatureName : IIS-FTPSvc
State       : Disabled

FeatureName : IIS-FTPExtensibility
State       : Disabled

FeatureName : WAS-WindowsActivationService
State       : Disabled

FeatureName : WAS-ProcessModel
State       : Disabled

FeatureName : WAS-NetFxEnvironment
State       : Disabled

FeatureName : WAS-ConfigurationAPI
State       : Disabled

FeatureName : IIS-HostableWebCore
State       : Disabled

FeatureName : BITSExtensions-AdminPack
State       : Disabled

FeatureName : BITSExtensions-Upload
State       : Disabled

FeatureName : WCF-HTTP-Activation
State       : Disabled

FeatureName : WCF-NonHTTP-Activation
State       : Disabled

FeatureName : Smtpsvc-Admin-Update-Name
State       : Disabled

FeatureName : Smtpsvc-Service-Update-Name
State       : Disabled

FeatureName : RPC-HTTP_Proxy
State       : Disabled

FeatureName : Printing-InternetPrinting-Server
State       : Disabled

FeatureName : Gateway-UI
State       : Disabled

FeatureName : Gateway
State       : Disabled

FeatureName : WorkFolders-Server
State       : Disabled

FeatureName : Microsoft-Windows-Web-Services-for-Management-IIS-Extension
State       : Disabled

FeatureName : MSMQ
State       : Disabled

FeatureName : MSMQ-Services
State       : Disabled

FeatureName : MSMQ-DCOMProxy
State       : Disabled

FeatureName : MSMQ-Server
State       : Disabled

FeatureName : MSMQ-ADIntegration
State       : Disabled

FeatureName : MSMQ-HTTP
State       : Disabled

FeatureName : MSMQ-Multicast
State       : Disabled

FeatureName : MSMQ-Triggers
State       : Disabled

FeatureName : MSMQ-RoutingServer
State       : Disabled

FeatureName : FSRM-Infrastructure-Services
State       : Disabled

FeatureName : DirectoryServices-ADAM
State       : Disabled

FeatureName : ServerCore-WOW64
State       : Enabled

FeatureName : Printing-Server-Foundation-Features
State       : Disabled

FeatureName : Printing-Server-Role
State       : Disabled

FeatureName : Printing-LPDPrintService
State       : Disabled

FeatureName : Printing-Client
State       : Enabled

FeatureName : Printing-Client-Gui
State       : Enabled

FeatureName : NetFx3ServerFeatures
State       : Enabled

FeatureName : NetFx3
State       : Enabled

FeatureName : MediaPlayback
State       : Enabled

FeatureName : WindowsMediaPlayer
State       : Enabled

FeatureName : Printing-XPSServices-Features
State       : Enabled

FeatureName : LegacyComponents
State       : Disabled

FeatureName : DirectPlay
State       : Disabled

FeatureName : Windows-Identity-Foundation
State       : Disabled

FeatureName : MultiPoint-Connector
State       : Disabled

FeatureName : MultiPoint-Connector-Services
State       : Disabled

FeatureName : MultiPoint-Tools
State       : Disabled

FeatureName : FailoverCluster-AdminPak
State       : Enabled

FeatureName : HardenedFabricEncryptionTask
State       : Disabled

FeatureName : SimpleTCP
State       : Disabled

FeatureName : SmbDirect
State       : Enabled

FeatureName : Windows-Defender
State       : Enabled

FeatureName : EnhancedStorage
State       : Disabled

FeatureName : Server-Manager-RSAT-File-Services
State       : Disabled

FeatureName : Server-RSAT-SNMP
State       : Disabled

FeatureName : WINS-Server-Tools
State       : Disabled

FeatureName : BitLocker-RemoteAdminTool
State       : Disabled

FeatureName : BdeAducExtTool
State       : Disabled

FeatureName : RSAT-RDS-Tools-Feature
State       : Disabled

FeatureName : DHCPServer-Tools
State       : Disabled

FeatureName : NetworkLoadBalancingManagementClient
State       : Disabled

FeatureName : RightsManagementServicesManagementTools
State       : Disabled

FeatureName : Security-SPP-Vmw
State       : Disabled

FeatureName : File-Services-Search-Service
State       : Disabled

FeatureName : iSCSITargetStorageProviders
State       : Disabled

FeatureName : BITS
State       : Disabled

FeatureName : LightweightServer
State       : Disabled

FeatureName : MultipathIo
State       : Disabled

FeatureName : Printing-PrintToPDFServices-Features
State       : Enabled

FeatureName : SNMP
State       : Disabled

FeatureName : WMISnmpProvider
State       : Disabled

FeatureName : Xps-Foundation-Xps-Viewer
State       : Enabled

FeatureName : SMBBW
State       : Disabled

FeatureName : MSRDC-Infrastructure
State       : Disabled

FeatureName : WINSRuntime
State       : Disabled

FeatureName : RasCMAK
State       : Disabled

FeatureName : Remote-Desktop-Services
State       : Disabled

FeatureName : SBMgr-UI
State       : Disabled

FeatureName : SessionDirectory
State       : Disabled

FeatureName : AppServer
State       : Disabled

FeatureName : VmHostAgent
State       : Disabled

FeatureName : NPAS-Role
State       : Disabled

FeatureName : SearchEngine-Server-Package
State       : Disabled

FeatureName : BitLocker-NetworkUnlock
State       : Disabled

FeatureName : FailoverCluster-AutomationServer
State       : Enabled

FeatureName : FailoverCluster-CmdInterface
State       : Disabled

FeatureName : FRS-Infrastructure
State       : Disabled

FeatureName : ResumeKeyFilter
State       : Disabled

FeatureName : BiometricFramework
State       : Disabled

FeatureName : SetupAndBootEventCollection
State       : Disabled

FeatureName : ServerManager-Core-RSAT
State       : Enabled

FeatureName : ServerManager-Core-RSAT-Role-Tools
State       : Disabled

FeatureName : ServerManager-Core-RSAT-Feature-Tools
State       : Enabled

FeatureName : Storage-Replica-AdminPack
State       : Disabled

FeatureName : DNS-Server-Tools
State       : Disabled

FeatureName : ShieldedVMToolsAdminPack
State       : Disabled

FeatureName : RSAT-AD-Tools-Feature
State       : Disabled

FeatureName : RSAT-ADDS-Tools-Feature
State       : Disabled

FeatureName : DirectoryServices-DomainController-Tools
State       : Disabled

FeatureName : DirectoryServices-ADAM-Tools
State       : Disabled

FeatureName : Microsoft-Hyper-V
State       : Disabled

FeatureName : Microsoft-Hyper-V-Offline
State       : Disabled

FeatureName : Microsoft-Hyper-V-Online
State       : Disabled

FeatureName : RSAT-Hyper-V-Tools-Feature
State       : Disabled

FeatureName : Microsoft-Hyper-V-Management-Clients
State       : Disabled

FeatureName : Microsoft-Hyper-V-Management-PowerShell
State       : Disabled

FeatureName : HostGuardian
State       : Disabled

FeatureName : NetworkVirtualization
State       : Disabled

FeatureName : NetworkLoadBalancingFullServer
State       : Disabled

FeatureName : PeerDist
State       : Disabled

FeatureName : P2P-PnrpOnly
State       : Disabled

FeatureName : QWAVE
State       : Enabled

FeatureName : RemoteAssistance
State       : Disabled

FeatureName : ServicesForNFS-ServerAndClient
State       : Disabled

FeatureName : ClientForNFS-Infrastructure
State       : Disabled

FeatureName : ServerForNFS-Infrastructure
State       : Disabled

FeatureName : TFTP
State       : Disabled

FeatureName : TIFFIFilter
State       : Disabled

FeatureName : WirelessNetworking
State       : Enabled

FeatureName : WebDAV-Redirector
State       : Disabled

FeatureName : TelnetClient
State       : Disabled

FeatureName : Printing-LPRPortMonitor
State       : Disabled

FeatureName : Printing-InternetPrinting-Client
State       : Disabled

FeatureName : Printing-AdminTools-Collection
State       : Disabled

FeatureName : OEM-Appliance-OOBE
State       : Disabled

FeatureName : DfsMgmt
State       : Disabled

FeatureName : ADCertificateServicesManagementTools
State       : Disabled

FeatureName : CertificateServicesManagementTools
State       : Disabled

FeatureName : OnlineRevocationServicesManagementTools
State       : Disabled

FeatureName : NPSMMC
State       : Disabled

FeatureName : Licensing-UI
State       : Disabled

FeatureName : Licensing-Diagnosis-UI
State       : Disabled

FeatureName : Microsoft-Windows-Deployment-Services-Admin-Pack
State       : Disabled

FeatureName : NFS-Administration
State       : Disabled

FeatureName : FaxServiceConfigRole
State       : Disabled

FeatureName : NPSManagementTools
State       : Disabled

FeatureName : FSRM-Management
State       : Disabled

FeatureName : CCFFilter
State       : Disabled

FeatureName : FabricShieldedTools
State       : Disabled

FeatureName : DataCenterBridging
State       : Disabled

FeatureName : DiskIo-QoS
State       : Disabled

FeatureName : ServerMigration
State       : Disabled

FeatureName : SMBHashGeneration
State       : Disabled

FeatureName : SmbWitness
State       : Disabled

FeatureName : Storage-Replica
State       : Disabled

FeatureName : Dedup-Core
State       : Disabled

FeatureName : DFSN-Server
State       : Disabled

FeatureName : DFSR-Infrastructure-ServerEdition
State       : Disabled

FeatureName : FileServerVSSAgent
State       : Disabled

FeatureName : iSCSITargetServer
State       : Disabled

FeatureName : Licensing
State       : Disabled

FeatureName : SoftwareLoadBalancer
State       : Disabled

FeatureName : Microsoft-Windows-GroupPolicy-ServerAdminTools-Update
State       : Disabled

FeatureName : Windows-Internal-Database
State       : Disabled

FeatureName : BitLocker
State       : Disabled

FeatureName : Bitlocker-Utilities
State       : Disabled

FeatureName : FailoverCluster-PowerShell
State       : Disabled

FeatureName : SMB1Protocol
State       : Disabled

FeatureName : SMB1Protocol-Client
State       : Disabled

FeatureName : SMB1Protocol-Server
State       : Disabled

FeatureName : Server-Drivers-General
State       : Enabled

FeatureName : Server-Drivers-Printers
State       : Enabled

FeatureName : Server-Shell
State       : Enabled

FeatureName : Internet-Explorer-Optional-amd64
State       : Enabled

FeatureName : Microsoft-Windows-Deployment-Services
State       : Disabled

FeatureName : Microsoft-Windows-Deployment-Services-Transport-Server
State       : Disabled

FeatureName : Microsoft-Windows-Deployment-Services-Deployment-Server
State       : Disabled

FeatureName : FaxServiceRole
State       : Disabled

FeatureName : Server-Gui-Mgmt
State       : Enabled

FeatureName : Server-Gui-Mgmt_onecore
State       : Disabled

FeatureName : RSAT
State       : Enabled

FeatureName : FailoverCluster-Mgmt
State       : Disabled

FeatureName : WindowsServerBackupSnapin
State       : Enabled

FeatureName : ServerMediaFoundation
State       : Disabled

FeatureName : Microsoft-Windows-MultiPoint-Connector
State       : Enabled

FeatureName : Microsoft-Windows-PhotoBasic
State       : Enabled

FeatureName : Microsoft-Windows-Printing-PremiumTools
State       : Enabled

FeatureName : Microsoft-Windows-StorageService
State       : Enabled

FeatureName : WindowsServerBackup
State       : Disabled

FeatureName : FailoverCluster-FullServer
State       : Disabled

FeatureName : Containers
State       : Disabled

FeatureName : Containers-HNS
State       : Disabled

FeatureName : Containers-SDN
State       : Disabled

FeatureName : WindowsStorageManagementService
State       : Disabled

FeatureName : DHCPServer
State       : Disabled

FeatureName : DNS-Server-Full-Role
State       : Disabled

FeatureName : VolumeActivation-Full-Role
State       : Disabled

FeatureName : SearchEngine-Client-Package
State       : Enabled

FeatureName : FileAndStorage-Services
State       : Enabled

FeatureName : Storage-Services
State       : Enabled

FeatureName : File-Services
State       : Disabled

FeatureName : CoreFileServer
State       : Disabled

FeatureName : SystemInsightsManagement
State       : Disabled

FeatureName : SystemInsights
State       : Disabled

FeatureName : SystemDataArchiver
State       : Enabled

FeatureName : ServerCoreFonts-NonCritical-Fonts-MinConsoleFonts
State       : Enabled

FeatureName : ServerCoreFonts-NonCritical-Fonts-BitmapFonts
State       : Enabled

FeatureName : ServerCoreFonts-NonCritical-Fonts-TrueType
State       : Enabled

FeatureName : ServerCoreFonts-NonCritical-Fonts-UAPFonts
State       : Enabled

FeatureName : ServerCoreFonts-NonCritical-Fonts-Support
State       : Enabled

FeatureName : StorageMigrationServiceManagement
State       : Disabled

FeatureName : StorageMigrationService
State       : Disabled

FeatureName : StorageMigrationServiceProxy
State       : Disabled

FeatureName : AzureArcSetup
State       : Enabled

FeatureName : ServerCore-Drivers-General
State       : Enabled

FeatureName : ServerCore-Drivers-General-WOW64
State       : Enabled

FeatureName : Client-ProjFS
State       : Disabled

FeatureName : HypervisorPlatform
State       : Disabled

FeatureName : VirtualMachinePlatform
State       : Disabled

FeatureName : Microsoft-Windows-Subsystem-Linux
State       : Disabled

如果你只想查看已安装的功能,可以使用以下命令:

powershell
Get-WindowsOptionalFeature -Online | Where-Object {$_.State -eq "Enabled"}
这将仅显示已启用(已安装)的功能列表。

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows

PS C:\Users\Administrator> Get-WindowsOptionalFeature -Online | Where-Object {$_.State -eq "Enabled"}


FeatureName : Server-Core
State       : Enabled

FeatureName : NetFx4ServerFeatures
State       : Enabled

FeatureName : NetFx4
State       : Enabled

FeatureName : WCF-Services45
State       : Enabled

FeatureName : WCF-TCP-PortSharing45
State       : Enabled

FeatureName : MicrosoftWindowsPowerShellRoot
State       : Enabled

FeatureName : MicrosoftWindowsPowerShell
State       : Enabled

FeatureName : Tpm-PSH-Cmdlets
State       : Enabled

FeatureName : MicrosoftWindowsPowerShellV2
State       : Enabled

FeatureName : KeyDistributionService-PSH-Cmdlets
State       : Enabled

FeatureName : TlsSessionTicketKey-PSH-Cmdlets
State       : Enabled

FeatureName : Server-Psh-Cmdlets
State       : Enabled

FeatureName : ServerCore-WOW64
State       : Enabled

FeatureName : Printing-Client
State       : Enabled

FeatureName : Printing-Client-Gui
State       : Enabled

FeatureName : NetFx3ServerFeatures
State       : Enabled

FeatureName : NetFx3
State       : Enabled

FeatureName : MediaPlayback
State       : Enabled

FeatureName : WindowsMediaPlayer
State       : Enabled

FeatureName : Printing-XPSServices-Features
State       : Enabled

FeatureName : FailoverCluster-AdminPak
State       : Enabled

FeatureName : SmbDirect
State       : Enabled

FeatureName : Windows-Defender
State       : Enabled

FeatureName : Printing-PrintToPDFServices-Features
State       : Enabled

FeatureName : Xps-Foundation-Xps-Viewer
State       : Enabled

FeatureName : FailoverCluster-AutomationServer
State       : Enabled

FeatureName : ServerManager-Core-RSAT
State       : Enabled

FeatureName : ServerManager-Core-RSAT-Feature-Tools
State       : Enabled

FeatureName : QWAVE
State       : Enabled

FeatureName : WirelessNetworking
State       : Enabled

FeatureName : Server-Drivers-General
State       : Enabled

FeatureName : Server-Drivers-Printers
State       : Enabled

FeatureName : Server-Shell
State       : Enabled

FeatureName : Internet-Explorer-Optional-amd64
State       : Enabled

FeatureName : Server-Gui-Mgmt
State       : Enabled

FeatureName : RSAT
State       : Enabled

FeatureName : WindowsServerBackupSnapin
State       : Enabled

FeatureName : Microsoft-Windows-MultiPoint-Connector
State       : Enabled

FeatureName : Microsoft-Windows-PhotoBasic
State       : Enabled

FeatureName : Microsoft-Windows-Printing-PremiumTools
State       : Enabled

FeatureName : Microsoft-Windows-StorageService
State       : Enabled

FeatureName : SearchEngine-Client-Package
State       : Enabled

FeatureName : FileAndStorage-Services
State       : Enabled

FeatureName : Storage-Services
State       : Enabled

FeatureName : SystemDataArchiver
State       : Enabled

FeatureName : ServerCoreFonts-NonCritical-Fonts-MinConsoleFonts
State       : Enabled

FeatureName : ServerCoreFonts-NonCritical-Fonts-BitmapFonts
State       : Enabled

FeatureName : ServerCoreFonts-NonCritical-Fonts-TrueType
State       : Enabled

FeatureName : ServerCoreFonts-NonCritical-Fonts-UAPFonts
State       : Enabled

FeatureName : ServerCoreFonts-NonCritical-Fonts-Support
State       : Enabled

FeatureName : AzureArcSetup
State       : Enabled

FeatureName : ServerCore-Drivers-General
State       : Enabled

FeatureName : ServerCore-Drivers-General-WOW64
State       : Enabled

------------

在 PowerShell 中,你可以使用以下命令来安装 Windows 组件功能:

powershell
Enable-WindowsOptionalFeature -Online -FeatureName <FeatureName>
其中,<FeatureName> 是要安装的功能的名称。你可以在上一条回答中提到的 Get-WindowsOptionalFeature -Online 命令的输出中找到功能的名称。

例如,如果你想安装 "Internet Information Services" 功能,你可以运行以下命令:

powershell
Enable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole
运行上述命令后,系统会开始下载和安装所选的功能。这可能需要一些时间,具体取决于功能的大小和数量。


------------

在 PowerShell 中,你可以使用以下命令来卸载 Windows 组件功能:

powershell
Disable-WindowsOptionalFeature -Online -FeatureName <FeatureName>
其中,<FeatureName> 是要卸载的功能的名称。你可以在上一条回答中提到的 Get-WindowsOptionalFeature -Online 命令的输出中找到功能的名称。

例如,如果你想卸载 "Internet Information Services" 功能,你可以运行以下命令:

powershell
Disable-WindowsOptionalFeature -Online -FeatureName IIS-WebServerRole
运行上述命令后,系统会开始卸载所选的功能。这可能需要一些时间,具体取决于功能的大小和数量。


------------


control.exe /name Microsoft.AdministrativeTools

为了直接使用,上面命令 直接 打开 控制面板 管理工具

posted @ 2023-10-25 22:29  suv789  阅读(369)  评论(0)    收藏  举报