windows系统利用powershell查看系统支持那些Windows功能选项

本文介绍了如何在PowerShell中使用Get-WindowsOptionalFeature命令查看Windows功能选项状态,包括如何启用和禁用特定功能如网络负载平衡和SMB服务。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

查看windows功能选项

在PowerShell中,我们可以使用Get-WindowsOptionalFeature cmdlet命令来查看Windows功能选项。

打开PowerShell

输入以下命令:将结果输出到1.log

Get-WindowsOptionalFeature -Online >1.log

可以看到在指定路径下看到生成了文件

打开查看内容:FeatureName 是这个功能的唯一标识,我们可以通过这个名称去启动和禁用



Feature Name : NetFx4ServerFeatures
State        : Enabled

Feature Name : NetFx4
State        : Enabled

Feature Name : NetFx4Extended-ASPNET45
State        : Disabled

Feature Name : MicrosoftWindowsPowerShellRoot
State        : Enabled

Feature Name : MicrosoftWindowsPowerShell
State        : Enabled

Feature Name : ServerCore-FullServer
State        : Enabled

Feature Name : IIS-WebServerRole
State        : Disabled

Feature Name : IIS-WebServer
State        : Disabled

Feature Name : IIS-CommonHttpFeatures
State        : Disabled

Feature Name : IIS-Security
State        : Disabled

Feature Name : IIS-RequestFiltering
State        : Disabled

Feature Name : IIS-StaticContent
State        : Disabled

Feature Name : IIS-DefaultDocument
State        : Disabled

Feature Name : IIS-DirectoryBrowsing
State        : Disabled

Feature Name : IIS-HttpErrors
State        : Disabled

Feature Name : IIS-HttpRedirect
State        : Disabled

Feature Name : IIS-WebDAV
State        : Disabled

Feature Name : IIS-ApplicationDevelopment
State        : Disabled

Feature Name : IIS-WebSockets
State        : Disabled

Feature Name : IIS-ApplicationInit
State        : Disabled

Feature Name : IIS-NetFxExtensibility
State        : Disabled

Feature Name : IIS-NetFxExtensibility45
State        : Disabled

Feature Name : IIS-ISAPIExtensions
State        : Disabled

Feature Name : IIS-ISAPIFilter
State        : Disabled

Feature Name : IIS-ASPNET
State        : Disabled

Feature Name : IIS-ASPNET45
State        : Disabled

Feature Name : IIS-ASP
State        : Disabled

Feature Name : IIS-CGI
State        : Disabled

Feature Name : IIS-ServerSideIncludes
State        : Disabled

Feature Name : IIS-HealthAndDiagnostics
State        : Disabled

Feature Name : IIS-HttpLogging
State        : Disabled

Feature Name : IIS-LoggingLibraries
State        : Disabled

Feature Name : IIS-RequestMonitor
State        : Disabled

Feature Name : IIS-HttpTracing
State        : Disabled

Feature Name : IIS-CustomLogging
State        : Disabled

Feature Name : IIS-ODBCLogging
State        : Disabled

Feature Name : IIS-CertProvider
State        : Disabled

Feature Name : IIS-BasicAuthentication
State        : Disabled

Feature Name : IIS-WindowsAuthentication
State        : Disabled

Feature Name : IIS-DigestAuthentication
State        : Disabled

Feature Name : IIS-ClientCertificateMappingAuthentication
State        : Disabled

Feature Name : IIS-IISCertificateMappingAuthentication
State        : Disabled

Feature Name : IIS-URLAuthorization
State        : Disabled

Feature Name : IIS-IPSecurity
State        : Disabled

Feature Name : IIS-Performance
State        : Disabled

Feature Name : IIS-HttpCompressionStatic
State        : Disabled

Feature Name : IIS-HttpCompressionDynamic
State        : Disabled

Feature Name : IIS-WebServerManagementTools
State        : Disabled

Feature Name : IIS-ManagementConsole
State        : Disabled

Feature Name : IIS-LegacySnapIn
State        : Disabled

Feature Name : IIS-ManagementScriptingTools
State        : Disabled

Feature Name : IIS-ManagementService
State        : Disabled

Feature Name : IIS-IIS6ManagementCompatibility
State        : Disabled

Feature Name : IIS-Metabase
State        : Disabled

Feature Name : IIS-WMICompatibility
State        : Disabled

Feature Name : IIS-LegacyScripts
State        : Disabled

Feature Name : IIS-FTPServer
State        : Disabled

Feature Name : IIS-FTPSvc
State        : Disabled

Feature Name : IIS-FTPExtensibility
State        : Disabled

Feature Name : WAS-WindowsActivationService
State        : Disabled

Feature Name : WAS-ProcessModel
State        : Disabled

Feature Name : WAS-NetFxEnvironment
State        : Disabled

Feature Name : WAS-ConfigurationAPI
State        : Disabled

Feature Name : IIS-HostableWebCore
State        : Disabled

Feature Name : BITSExtensions-AdminPack
State        : Disabled

Feature Name : Gateway-UI
State        : Disabled

Feature Name : MSMQ
State        : Disabled

Feature Name : MSMQ-Services
State        : Disabled

Feature Name : MSMQ-Server
State        : Disabled

Feature Name : MSMQ-Triggers
State        : Disabled

Feature Name : MSMQ-ADIntegration
State        : Disabled

Feature Name : MSMQ-HTTP
State        : Disabled

Feature Name : MSMQ-Multicast
State        : Disabled

Feature Name : MSMQ-DCOMProxy
State        : Disabled

Feature Name : MSMQ-RoutingServer
State        : Disabled

Feature Name : WCF-Services45
State        : Enabled

Feature Name : WCF-HTTP-Activation45
State        : Disabled

Feature Name : WCF-TCP-Activation45
State        : Disabled

Feature Name : WCF-Pipe-Activation45
State        : Disabled

Feature Name : WCF-MSMQ-Activation45
State        : Disabled

Feature Name : WCF-TCP-PortSharing45
State        : Enabled

Feature Name : ManagementOdata
State        : Disabled

Feature Name : DSC-Service
State        : Disabled

Feature Name : IdentityServer-SecurityTokenService
State        : Disabled

Feature Name : Application-Server
State        : Disabled

Feature Name : AS-NET-Framework
State        : Disabled

Feature Name : Application-Server-WebServer-Support
State        : Disabled

Feature Name : AS-Ent-Services
State        : Disabled

Feature Name : Application-Server-TCP-Port-Sharing
State        : Disabled

Feature Name : Application-Server-WAS-Support
State        : Disabled

Feature Name : Application-Server-HTTP-Activation
State        : Disabled

Feature Name : Application-Server-MSMQ-Activation
State        : Disabled

Feature Name : Application-Server-TCP-Activation
State        : Disabled

Feature Name : Application-Server-Pipe-Activation
State        : Disabled

Feature Name : AS-Dist-Transaction
State        : Disabled

Feature Name : AS-Incoming-Trans
State        : Disabled

Feature Name : AS-Outgoing-Trans
State        : Disabled

Feature Name : AS-WS-Atomic
State        : Disabled

Feature Name : ADCertificateServicesRole
State        : Disabled

Feature Name : CertificateServices
State        : Disabled

Feature Name : OnlineRevocationServices
State        : Disabled

Feature Name : WebEnrollmentServices
State        : Disabled

Feature Name : NetworkDeviceEnrollmentServices
State        : Disabled

Feature Name : CertificateEnrollmentPolicyServer
State        : Disabled

Feature Name : CertificateEnrollmentServer
State        : Disabled

Feature Name : Web-Application-Proxy
State        : Disabled

Feature Name : IPAMServerFeature
State        : Disabled

Feature Name : RightsManagementServices-Role
State        : Disabled

Feature Name : RightsManagementServices
State        : Disabled

Feature Name : RMS-Federation
State        : Disabled

Feature Name : RightsManagementServices-AdminTools
State        : Disabled

Feature Name : WSS-Product-Package
State        : Disabled

Feature Name : BITSExtensions-Upload
State        : Disabled

Feature Name : Printing-Server-Foundation-Features
State        : Disabled

Feature Name : Printing-Server-Role
State        : Disabled

Feature Name : Printing-LPDPrintService
State        : Disabled

Feature Name : BusScan-ScanServer
State        : Disabled

Feature Name : Printing-InternetPrinting-Server
State        : Disabled

Feature Name : HCAP-Server
State        : Disabled

Feature Name : HCSRuntime
State        : Disabled

Feature Name : RemoteAccess
State        : Disabled

Feature Name : RemoteAccessServer
State        : Disabled

Feature Name : RasRoutingProtocols
State        : Disabled

Feature Name : WCF-HTTP-Activation
State        : Disabled

Feature Name : WCF-NonHTTP-Activation
State        : Disabled

Feature Name : WindowsPowerShellWebAccess
State        : Disabled

Feature Name : RPC-HTTP_Proxy
State        : Disabled

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

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

Feature Name : Gateway
State        : Disabled

Feature Name : WebAccess
State        : Disabled

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

Feature Name : WorkFolders-Server
State        : Disabled

Feature Name : UpdateServices
State        : Disabled

Feature Name : UpdateServices-Services
State        : Disabled

Feature Name : UpdateServices-Database
State        : Disabled

Feature Name : UpdateServices-WidDatabase
State        : Disabled

Feature Name : Microsoft-Windows-Deployment-Services
State        : Disabled

Feature Name : Microsoft-Windows-Deployment-Services-Deployment-Server
State        : Disabled

Feature Name : Microsoft-Windows-Deployment-Services-Transport-Server
State        : Disabled

Feature Name : Microsoft-Windows-Deployment-Services-Legacy-SIS
State        : Disabled

Feature Name : BitLocker
State        : Disabled

Feature Name : Bitlocker-Utilities
State        : Disabled

Feature Name : BitLocker-NetworkUnlock
State        : Disabled

Feature Name : User-Interfaces-Infra
State        : Enabled

Feature Name : Server-Gui-Mgmt
State        : Enabled

Feature Name : RSAT
State        : Enabled

Feature Name : CoreFileServer-RSAT
State        : Disabled

Feature Name : Server-Manager-RSAT-File-Services
State        : Disabled

Feature Name : Server-RSAT-SNMP
State        : Disabled

Feature Name : DNS-Server-Tools
State        : Disabled

Feature Name : IPAMClientFeature
State        : Disabled

Feature Name : WINS-Server-Tools
State        : Disabled

Feature Name : DfsMgmt
State        : Disabled

Feature Name : ADCertificateServicesManagementTools
State        : Disabled

Feature Name : CertificateServicesManagementTools
State        : Disabled

Feature Name : OnlineRevocationServicesManagementTools
State        : Disabled

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

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

Feature Name : DirectoryServices-DomainController-Tools
State        : Disabled

Feature Name : DirectoryServices-ADAM-Tools
State        : Disabled

Feature Name : BitLocker-RemoteAdminTool
State        : Disabled

Feature Name : BdeAducExtTool
State        : Disabled

Feature Name : ActiveDirectory-PowerShell
State        : Disabled

Feature Name : DirectoryServices-DomainController
State        : Disabled

Feature Name : DirectoryServices-ISM-Smtp
State        : Disabled

Feature Name : DirectoryServices-AdministrativeCenter
State        : Disabled

Feature Name : RasServerAdminTools
State        : Disabled

Feature Name : DamgmtTools
State        : Disabled

Feature Name : HCSUI
State        : Disabled

Feature Name : Licensing-UI
State        : Disabled

Feature Name : Licensing-Diagnosis-UI
State        : Disabled

Feature Name : Microsoft-Windows-Deployment-Services-Admin-Pack
State        : Disabled

Feature Name : DHCPServer-Tools
State        : Disabled

Feature Name : FailoverCluster-Mgmt
State        : Disabled

Feature Name : NetworkLoadBalancingManagementClient
State        : Disabled

Feature Name : NFS-Administration
State        : Disabled

Feature Name : UpdateServices-UI
State        : Disabled

Feature Name : WindowsServerBackupSnapin
State        : Enabled

Feature Name : FaxServiceConfigRole
State        : Disabled

Feature Name : NPSManagementTools
State        : Disabled

Feature Name : RightsManagementServicesManagementTools
State        : Disabled

Feature Name : Security-SPP-Vmw
State        : Disabled

Feature Name : FSRM-Infrastructure
State        : Disabled

Feature Name : FSRM-Management
State        : Disabled

Feature Name : Microsoft-Windows-FCI-Client-Package
State        : Disabled

Feature Name : Printing-Client
State        : Enabled

Feature Name : Printing-Client-Gui
State        : Enabled

Feature Name : RSAT-NIS
State        : Disabled

Feature Name : MicrosoftWindowsPowerShellISE
State        : Enabled

Feature Name : Microsoft-Hyper-V
State        : Disabled

Feature Name : Microsoft-Hyper-V-Offline
State        : Disabled

Feature Name : Microsoft-Hyper-V-Online
State        : Disabled

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

Feature Name : Microsoft-Hyper-V-Management-Clients
State        : Disabled

Feature Name : Microsoft-Hyper-V-Management-PowerShell
State        : Disabled

Feature Name : VmHostAgent
State        : Disabled

Feature Name : Server-Gui-Shell
State        : Enabled

Feature Name : Internet-Explorer-Optional-amd64
State        : Enabled

Feature Name : FaxServiceRole
State        : Disabled

Feature Name : ServicesForNFS-ServerAndClient
State        : Disabled

Feature Name : ServerForNFS-Infrastructure
State        : Disabled

Feature Name : ClientForNFS-Infrastructure
State        : Disabled

Feature Name : SearchEngine-Server-Package
State        : Disabled

Feature Name : FSRM-Infrastructure-Services
State        : Disabled

Feature Name : NPAS-Role
State        : Disabled

Feature Name : IAS NT Service
State        : Disabled

Feature Name : iSCSITargetServer-PowerShell
State        : Disabled

Feature Name : OEM-Appliance-OOBE
State        : Disabled

Feature Name : PSync
State        : Disabled

Feature Name : AppServer
State        : Disabled

Feature Name : Microsoft-Windows-ServerEssentials-ServerSetup
State        : Disabled

Feature Name : PKIClient-PSH-Cmdlets
State        : Disabled

Feature Name : KeyDistributionService-PSH-Cmdlets
State        : Enabled

Feature Name : TlsSessionTicketKey-PSH-Cmdlets
State        : Enabled

Feature Name : RemoteAccessMgmtTools
State        : Disabled

Feature Name : RemoteAccessPowerShell
State        : Disabled

Feature Name : MicrosoftWindowsPowerShellV2
State        : Enabled

Feature Name : Server-Psh-Cmdlets
State        : Enabled

Feature Name : UpdateServices-RSAT
State        : Disabled

Feature Name : UpdateServices-API
State        : Disabled

Feature Name : DirectoryServices-ADAM
State        : Disabled

Feature Name : AuthManager
State        : Disabled

Feature Name : ServerCore-WOW64
State        : Enabled

Feature Name : ServerCore-EA-IME-WOW64
State        : Enabled

Feature Name : LegacyComponents
State        : Disabled

Feature Name : DirectPlay
State        : Disabled

Feature Name : Windows-Identity-Foundation
State        : Disabled

Feature Name : SimpleTCP
State        : Disabled

Feature Name : Printing-LPRPortMonitor
State        : Disabled

Feature Name : Printing-InternetPrinting-Client
State        : Disabled

Feature Name : Printing-AdminTools-Collection
State        : Disabled

Feature Name : ServerManager-Core-RSAT
State        : Disabled

Feature Name : ServerManager-Core-RSAT-Role-Tools
State        : Disabled

Feature Name : ServerManager-Core-RSAT-Feature-Tools
State        : Disabled

Feature Name : NetFx3ServerFeatures
State        : Disabled

Feature Name : NetFx3
State        : DisabledWithPayloadRemoved

Feature Name : EnhancedStorage
State        : Disabled

Feature Name : Microsoft-Windows-GroupPolicy-ServerAdminTools-Update
State        : Disabled

Feature Name : RasCMAK
State        : Disabled

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

Feature Name : FailoverCluster-AdminPak
State        : Disabled

Feature Name : FailoverCluster-PowerShell
State        : Disabled

Feature Name : AdminUI
State        : Disabled

Feature Name : BiometricFramework
State        : Disabled

Feature Name : WindowsServerBackup
State        : Disabled

Feature Name : WindowsFeedbackForwarder
State        : Disabled

Feature Name : FileAndStorage-Services
State        : Enabled

Feature Name : Storage-Services
State        : Enabled

Feature Name : File-Services
State        : Disabled

Feature Name : CoreFileServer
State        : Disabled

Feature Name : File-Services-Search-Service
State        : Disabled

Feature Name : DFSN-Server
State        : Disabled

Feature Name : DFSR-Infrastructure-ServerEdition
State        : Disabled

Feature Name : FileServerVSSAgent
State        : Disabled

Feature Name : iSCSITargetServer
State        : Disabled

Feature Name : SMBHashGeneration
State        : Disabled

Feature Name : Dedup-Core
State        : Disabled

Feature Name : DHCPServer
State        : Disabled

Feature Name : DNS-Server-Full-Role
State        : Disabled

Feature Name : FailoverCluster-AutomationServer
State        : Disabled

Feature Name : FailoverCluster-CmdInterface
State        : Disabled

Feature Name : FRS-Infrastructure
State        : Disabled

Feature Name : Windows-Internal-Database
State        : Disabled

Feature Name : WINSRuntime
State        : Disabled

Feature Name : iSCSITargetStorageProviders
State        : Disabled

Feature Name : iSNS_Service
State        : Disabled

Feature Name : BITS
State        : Disabled

Feature Name : LightweightServer
State        : Disabled

Feature Name : MultipathIo
State        : Disabled

Feature Name : NetworkLoadBalancingFullServer
State        : Disabled

Feature Name : NIS
State        : Disabled

Feature Name : PeerDist
State        : Disabled

Feature Name : P2P-PnrpOnly
State        : Disabled

Feature Name : Printing-XPSServices-Features
State        : Enabled

Feature Name : QWAVE
State        : Disabled

Feature Name : MSRDC-Infrastructure
State        : Disabled

Feature Name : RemoteAssistance
State        : Disabled

Feature Name : ServerCore-EA-IME
State        : Enabled

Feature Name : DataCenterBridging
State        : Disabled

Feature Name : ServerMediaFoundation
State        : Disabled

Feature Name : InkAndHandwritingServices
State        : Disabled

Feature Name : DesktopExperience
State        : Disabled

Feature Name : MediaPlayback
State        : Disabled

Feature Name : WindowsMediaPlayer
State        : Disabled

Feature Name : ServerMigration
State        : Disabled

Feature Name : ServerCore-Drivers-General
State        : Enabled

Feature Name : Server-Drivers-General
State        : Enabled

Feature Name : Server-Drivers-Printers
State        : Enabled

Feature Name : SIS-Limited
State        : Disabled

Feature Name : SmbDirect
State        : Enabled

Feature Name : SNMP
State        : Disabled

Feature Name : WMISnmpProvider
State        : Disabled

Feature Name : WindowsStorageManagementService
State        : Disabled

Feature Name : TelnetClient
State        : Disabled

Feature Name : TelnetServer
State        : Disabled

Feature Name : Remote-Desktop-Services
State        : Disabled

Feature Name : SessionDirectory
State        : Disabled

Feature Name : SBMgr-UI
State        : Disabled

Feature Name : Licensing
State        : Disabled

Feature Name : TFTP
State        : Disabled

Feature Name : VolumeActivation-Full-Role
State        : Disabled

Feature Name : TIFFIFilter
State        : Disabled

Feature Name : WirelessNetworking
State        : Disabled

Feature Name : Xps-Foundation-Xps-Viewer
State        : Disabled

Feature Name : SMB1Protocol
State        : Enabled

Feature Name : SMBBW
State        : Disabled

Feature Name : FailoverCluster-FullServer
State        : Disabled

Feature Name : CCFFilter
State        : Disabled

Feature Name : ResumeKeyFilter
State        : Disabled

Feature Name : SmbWitness
State        : Disabled



启用功能:以网络负载平衡功能进行演示

dism.exe /online /enable-feature /featurename:NetworkLoadBalancingFullServer  /norestart

禁用功能

dism.exe /online /disable-feature /featurename:NetworkLoadBalancingFullServer  /norestart

启用功能:以smb服务为例

dism.exe /online /enable-feature /featurename:SMB1Protocol  /norestart

禁用功能

dism.exe /online /disable-feature /featurename:SMB1Protocol  /norestart

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

三希

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值