Use Windows PowerShell para instalar características opcionales

Microsoft Windows se entrega con un conjunto de las llamadas características opcionales que los usuarios pueden habilitar o deshabilitar utilizando el subprograma de panel de control "activar o desactivar las características de Windows".

Esto funciona bien en su mayor parte, pero requiere que abra el Panel de control en el sistema operativo a menos que cargue la ventana Características directamente escribiendo características opcionales en Inicio.

Si bien eso es suficiente la mayor parte del tiempo, los administradores también pueden usar PowerShell para administrar las características opcionales del sistema operativo Windows.

La siguiente guía le proporciona una descripción general de cómo funciona eso en Windows 10. Tenga en cuenta que esto puede no funcionar en versiones anteriores de Windows como Windows 7.

Windows PowerShell: instale características opcionales

Necesita un PowerShell elevado para los siguientes comandos. Toque la tecla Windows, escriba powershell, mantenga presionada la tecla Ctrl y la tecla Mayús y toque la tecla Intro para abrir un indicador de PowerShell con privilegios administrativos.

Listar todas las funciones opcionales y su estado.

Lo primero que puede hacer, al menos cuando es nuevo en el uso del comando, es mostrar la lista de características disponibles.

Ejecute get-windowsoptionalfeature -online para enumerar todos los nombres de funciones disponibles y sus estados en el sistema informático. El estado está habilitado o deshabilitado.

Nota: el parámetro -online significa que las acciones se ejecutan en el dispositivo actual.

Si bien es bastante fácil identificar algunas características por el nombre de la característica, no es fácil para todas ellas.

La siguiente lista es de Windows 10 Pro versión 1809

  • FeatureName: Printing-PrintToPDFServices-Features
  • FeatureName: Windows-Defender-Default-Definitions
  • FeatureName: Printing-XPSServices-Features
  • FeatureName: SearchEngine-Client-Package
  • FeatureName: Infraestructura MSRDC
  • FeatureName: TelnetClient
  • FeatureName: TFTP
  • FeatureName: TIFFIFilter
  • FeatureName: WorkFolders-Client
  • FeatureName: LegacyComponents
  • FeatureName: DirectPlay
  • FeatureName: Printing-Foundation-Features
  • FeatureName: FaxServicesClientPackage
  • FeatureName: Printing-Foundation-InternetPrinting-Client
  • 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: IIS-Performance
  • 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-ServerSideIncludes
  • FeatureName: IIS-CustomLogging
  • FeatureName: IIS-BasicAuthentication
  • FeatureName: IIS-HttpCompressionStatic
  • FeatureName: IIS-ManagementConsole
  • FeatureName: IIS-ManagementService
  • FeatureName: IIS-WMICompatibility
  • FeatureName: IIS-LegacyScripts
  • FeatureName: IIS-LegacySnapIn
  • FeatureName: IIS-FTPServer
  • FeatureName: IIS-FTPSvc
  • FeatureName: IIS-FTPExtensibility
  • 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-Container
  • FeatureName: MSMQ-Server
  • FeatureName: MSMQ-Triggers
  • FeatureName: MSMQ-ADIntegration
  • FeatureName: MSMQ-HTTP
  • FeatureName: MSMQ-Multicast
  • FeatureName: MSMQ-DCOMProxy
  • FeatureName: WCF-HTTP-Activation
  • FeatureName: WCF-NonHTTP-Activation
  • FeatureName: IIS-CertProvider
  • FeatureName: IIS-WindowsAuthentication
  • FeatureName: IIS-DigestAuthentication
  • FeatureName: IIS-ClientCertificateMappingAuthentication
  • FeatureName: IIS-IISCertificateMappingAuthentication
  • FeatureName: IIS-ODBCLogging
  • FeatureName: NetFx3
  • FeatureName: SMB1Protocol
  • FeatureName: SMB1Protocol-Client
  • FeatureName: SMB1Protocol-Server
  • FeatureName: SMB1Protocol-Deprecation
  • FeatureName: MediaPlayback
  • FeatureName: WindowsMediaPlayer
  • FeatureName: Microsoft-Windows-NetFx3-OC-Package
  • Nombre de la característica: Microsoft-Windows-NetFx4-US-OC-Package
  • FeatureName: Microsoft-Windows-Client-EmbeddedExp-Package
  • Nombre de la característica: Microsoft-Windows-NetFx3-WCF-OC-Package
  • Nombre de la característica: Microsoft-Windows-NetFx4-WCF-US-OC-Package
  • FeatureName: Containers-DisposableClientVM
  • FeatureName: Microsoft-Hyper-V-All
  • FeatureName: Microsoft-Hyper-V
  • FeatureName: Microsoft-Hyper-V-Tools-All
  • 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: Contenedores
  • FeatureName: SmbDirect
  • FeatureName: MultiPoint-Connector
  • FeatureName: MultiPoint-Connector-Services
  • FeatureName: MultiPoint-Tools
  • FeatureName: AppServerClient
  • FeatureName: Internet-Explorer-Opcional-amd64

Mostrar información sobre características

Puede usar el parámetro -featurename Example para mostrar información detallada sobre una característica que le interesa.

El comando get-windowsoptionalfeature -online -featurename NetFx 3, por ejemplo, revela que esto instala .Net Framework 3.5 en el sistema. También hay un enlace a Internet siempre que pueda hacer clic para buscar información adicional en línea.

Habilitar o deshabilitar una función opcional

Puede usar comandos de PowerShell para habilitar o deshabilitar características opcionales en una máquina con Windows 10.

Para ello se utilizan los comandos Enable-WindowsOptionalFeature -FeatureName y Disable-WindowsOptionalFeature -FeatureName.

Para darle dos ejemplos para mostrarle cómo funciona:

  • Enable-WindowsOptionalFeature -Online -FeatureName "NetFx3" -All : este comando instala Net Framework 3.5 en la computadora en la que se ejecuta el comando.
  • Disable-WindowsOptionalFeature -Online -FeatureName "NetFx3" : este comando deshabilita la característica nuevamente.

El parámetro -All le dice a Windows que instale también cualquier dependencia. Por lo tanto, si se requiere una característica principal para la instalación de la característica seleccionada, también se instala. Nota: Deshabilitar no es compatible con el parámetro -Todos.

Recursos

  • Microsoft Technet: Enable-WindowsOptionalFeature
  • Microsoft Technet: Disable-WindowsOptionalFeature
  • Microsoft Technet: Get-WindowsOptionalFeature