Utilitzeu Windows PowerShell per instal·lar funcions opcionals

Proveu El Nostre Instrument Per Eliminar Problemes

Microsoft Windows s’envia amb un conjunt de les anomenades funcions opcionals que els usuaris poden activar o desactivar mitjançant l’aplicat “activar o desactivar les funcions de Windows”.

Això funciona bé en la seva majoria, però requereix que tu obriu el Tauler de control al sistema operatiu tret que carregueu la finestra Funcions directament escrivint característiques opcionals a Start .

Tot i que això és suficient la majoria del temps, els administradors poden utilitzar PowerShell també per gestionar funcions opcionals del sistema operatiu Windows.

La següent guia us ofereix una visió general del funcionament de Windows 10. Tingueu en compte que potser no funciona en versions anteriors de Windows, com Windows 7.

Windows PowerShell: instal·leu funcions opcionals

Necessiteu una PowerShell elevat per a les ordres següents. Toqueu la tecla Windows, escriviu powershell, manteniu premuda la tecla Ctrl i la majúscula i toqueu la tecla Enter per obrir un indicador de PowerShell amb privilegis administratius.

Llista totes les funcions opcionals i el seu estat

powershell optional features

El primer que podeu fer, si més no quan utilitzeu la comanda nou, és mostrar la llista de funcions disponibles.

Correr get-windowsoptionalfeature -online per llistar tots els noms de funcions disponibles i els seus estats al sistema informàtic. L’estat està activat o desactivat.

Nota: el paràmetre -online significa que les accions s'executen al dispositiu actual.

Tot i que és prou fàcil identificar algunes funcions amb el nom de la característica, no és fàcil per a totes.

La llista següent és una versió 1809 de Windows 10 Pro

  • FeatureName: Funcions d'impressió-PrintToPDFServices
  • FeatureName: Definicions predeterminades de Windows-Defender-Defender
  • FeatureName: Característiques d'impressió-XPSServices
  • FeatureName: SearchEngine-Client-Package
  • FeatureName: MSRDC-Infrastructure
  • FeatureName: TelnetClient
  • FeatureName: TFTP
  • FeatureName: TIFFIFter
  • FeatureName: WorkFolders-Client
  • FeatureName: LegacyComponents
  • FeatureName: DirectPlay
  • FeatureName: Característiques d'impressió-Fundació
  • FeatureName: FaxServicesClientPackage
  • FeatureName: Client-Printing-Foundation-InternetPrinting
  • FeatureName: Printing-Foundation-LPDPrintService
  • FeatureName: Printing-Foundation-LPRPortMonitor
  • FeatureName: SimpleTCP
  • FeatureName: MicrosoftWindowsPowerShellV2Root
  • FeatureName: MicrosoftWindowsPowerShellV2
  • FeatureName: Windows-Identity-Foundation
  • FeatureName: Microsoft-Windows-Subsystem-Linux
  • FeatureName: HypervisorPlatform
  • FeatureName: VirtualMachinePlatform
  • FeatureName: Client-ProjFS
  • FeatureName: NetFx4-AdvSrvs
  • FeatureName: NetFx4Extended-ASPNET45
  • FeatureName: IIS-WebServerRole
  • FeatureName: IIS-WebServer
  • FeatureName: IIS-CommonHttpFeatures
  • FeatureName: IIS-HttpErrors
  • FeatureName: IIS-HttpRedirect
  • FeatureName: IIS-ApplicationDevelopment
  • FeatureName: IIS-NetFxExtensibility
  • FeatureName: IIS-NetFxExtensibility45
  • FeatureName: IIS-HealthAndDiagnostics
  • FeatureName: IIS-HttpLogging
  • FeatureName: IIS-LoggingLibraries
  • FeatureName: IIS-RequestMonitor
  • FeatureName: IIS-HttpTracing
  • FeatureName: IIS-Security
  • FeatureName: IIS-URLAuthorization
  • FeatureName: IIS-RequestFiltering
  • FeatureName: IIS-IPSecurity
  • FeatureName: Performance IIS
  • FeatureName: IIS-HttpCompressionDynamic
  • FeatureName: IIS-WebServerManagementTools
  • FeatureName: IIS-ManagementScriptingTools
  • FeatureName: IIS-IIS6ManagementCompatibility
  • FeatureName: IIS-Metabase
  • FeatureName: WAS-WindowsActivationService
  • FeatureName: WAS-ProcessModel
  • FeatureName: WAS-NetFxEnvironment
  • FeatureName: WAS-ConfigurationAPI
  • FeatureName: IIS-HostableWebCore
  • FeatureName: IIS-StaticContent
  • FeatureName: IIS-DefaultDocument
  • FeatureName: IIS-DirectoryBrowsing
  • FeatureName: IIS-WebDAV
  • FeatureName: IIS-WebSockets
  • FeatureName: IIS-ApplicationInit
  • FeatureName: IIS-ASPNET
  • FeatureName: IIS-ASPNET45
  • FeatureName: IIS-ASP
  • FeatureName: IIS-CGI
  • FeatureName: IIS-ISAPIExtensions
  • FeatureName: IIS-ISAPIFilter
  • FeatureName: IIS-ServerSideInclude
  • FeatureName: IIS-CustomLogging
  • FeatureName: IIS-BasicAuthentication
  • FeatureName: IIS-HttpCompressionStatic
  • FeatureName: IIS-ManagementConsole
  • FeatureName: IIS-ManagementService
  • FeatureName: compatibilitat IIS-WMIC
  • FeatureName: IIS-LegacyScripts
  • FeatureName: IIS-LegacySnapIn
  • FeatureName: Servidor IIS-FTPS
  • FeatureName: IIS-FTPSvc
  • FeatureName: IIS-FTPExtensibilitat
  • FeatureName: WCF-Services45
  • FeatureName: WCF-HTTP-Activation45
  • FeatureName: WCF-TCP-Activation45
  • FeatureName: WCF-Pipe-Activation45
  • FeatureName: WCF-MSMQ-Activation45
  • FeatureName: WCF-TCP-PortSharing45
  • FeatureName: MSMQ-Contenidor
  • FeatureName: MSMQ-Server
  • FeatureName: MSMQ-Triggers
  • FeatureName: MSMQ-ADIntegration
  • FeatureName: MSMQ-HTTP
  • FeatureName: MSMQ-Multicast
  • FeatureName: MSMQ-DCOMProxy
  • FeatureName: Activació de WCF-HTTP
  • FeatureName: Activació del WCF-No HTTP
  • FeatureName: IIS-CertProvider
  • FeatureName: IIS-WindowsAuthentication
  • FeatureName: IIS-DigestAuthentication
  • FeatureName: IIS-ClientCertificateMappingAuthentication
  • FeatureName: US-IISCertificateMappingAuthentication
  • FeatureName: IIS-ODBCLogging
  • FeatureName: NetFx3
  • FeatureName: SMB1Protocol
  • FeatureName: Client SMB1Protocol
  • FeatureName: SMB1Protocol-Server
  • FeatureName: SMB1Protocol-Deprecation
  • FeatureName: MediaPlayback
  • FeatureName: WindowsMediaPlayer
  • FeatureName: Paquet Microsoft-Windows-NetFx3-OC
  • FeatureName: Paquet Microsoft-Windows-NetFx4-US-OC-OC
  • FeatureName: Paquet de Microsoft-Windows-Client-EmbeddedExp
  • FeatureName: Paquet Microsoft-Windows-NetFx3-WCF-OC
  • FeatureName: Paquet Microsoft-Windows-NetFx4-WCF-US-OC
  • FeatureName: Contenidors-DisposablesClientVM
  • FeatureName: Microsoft-Hyper-V-All
  • FeatureName: Microsoft-Hyper-V
  • FeatureName: Microsoft-Hyper-V-Eines-Totes
  • FeatureName: Microsoft-Hyper-V-Management-PowerShell
  • FeatureName: Microsoft-Hyper-V-Hypervisor
  • FeatureName: Microsoft-Hyper-V-Services
  • FeatureName: Microsoft-Hyper-V-Management-Clients
  • FeatureName: HostGuardian
  • FeatureName: Client-DeviceLockdown
  • FeatureName: Client-EmbeddedShellLauncher
  • FeatureName: Client-EmbeddedBootExp
  • FeatureName: Client-EmbeddedLogon
  • FeatureName: Client-KeyboardFilter
  • FeatureName: Client-UnifiedWriteFilter
  • FeatureName: DataCenterBridging
  • FeatureName: DirectoryServices-ADAM-Client
  • FeatureName: Windows-Defender-ApplicationGuard
  • FeatureName: ServicesForNFS-ClientOnly
  • FeatureName: ClientForNFS-Infrastructure
  • FeatureName: NFS-Administration
  • FeatureName: Contenidors
  • FeatureName: SmbDirect
  • FeatureName: MultiPoint-Connector
  • FeatureName: Serveis multi-connectors
  • FeatureName: MultiPoint-Tools
  • FeatureName: AppServerClient
  • FeatureName: Internet-Explorer-Opcional-amd64

Mostra informació sobre funcions

powershell-display information about features

Podeu utilitzar el paràmetre -featurename Exemple per mostrar informació detallada sobre una característica que us interessa.

El comandament get-windowsoptionalfeature -online -featurename NetFx 3, per exemple, revela que això instal·la el .Net Framework 3.5 al sistema. També hi ha un enllaç a Internet sempre que es faci clic per cercar informació addicional en línia.

Activa o desactiva una funció opcional

Podeu utilitzar les ordres de PowerShell per habilitar o desactivar funcions opcionals en un equip Windows 10.

Per això s'utilitzen les comandes Enable-WindowsOptionalFeature -FeatureName i Disable-WindowsOptionalFeature -FeatureName.

Per donar-vos dos exemples per mostrar-vos com funciona:

  • Enable-WindowsOptionalFeature -Online -FeatureName 'NetFx3' -Tots - Aquesta ordre instal·la Net Framework 3.5 a l’ordinador on s’executa l’ordre.
  • Desactivar-WindowsOptionalFeature -Online -FeatureName 'NetFx3' - Aquesta ordre torna a desactivar la funció.

El paràmetre -All demana a Windows que instal·li qualsevol dependència també. Per tant, si cal una característica principal per a la instal·lació de la funció seleccionada, també s’instal·larà. Nota: Desactivar no és compatible amb el paràmetre -Tot.

PowerShell

Per a Windows

Descarrega ara

Recursos