Usa Windows PowerShell per installare funzionalità facoltative

Prova Il Nostro Strumento Per Eliminare I Problemi

Microsoft Windows viene fornito con una serie di cosiddette funzionalità opzionali che gli utenti possono abilitare o disabilitare utilizzando l'applet del pannello di controllo 'attiva o disattiva le funzionalità di Windows'.

Questo funziona bene per la maggior parte, ma lo richiede apri il pannello di controllo sul sistema operativo a meno che non si carichi la finestra Funzionalità direttamente digitando optionalfeatures in Start .

Sebbene ciò sia sufficiente per la maggior parte del tempo, gli amministratori possono utilizzare anche PowerShell per gestire le funzionalità opzionali del sistema operativo Windows.

La seguente guida fornisce una panoramica su come funziona su Windows 10. Tieni presente che potrebbe non funzionare su versioni precedenti di Windows come Windows 7.

Windows PowerShell: installa funzionalità opzionali

Hai bisogno di un file PowerShell elevato per i seguenti comandi. Tocca il tasto Windows, digita powershell, tieni premuto il tasto Ctrl e il tasto Maiusc e tocca il tasto Invio per aprire un prompt di PowerShell con privilegi amministrativi.

Elenca tutte le funzionalità opzionali e il loro stato

powershell optional features

La prima cosa che potresti voler fare, almeno quando sei nuovo nell'uso del comando, è visualizzare l'elenco delle funzionalità disponibili.

Correre get-windowsoptionalfeature -online per elencare tutti i nomi delle funzioni disponibili e il loro stato sul sistema del computer. Lo stato è abilitato o disabilitato.

Nota: il parametro -online significa che le azioni vengono eseguite sul dispositivo corrente.

Sebbene sia abbastanza facile identificare alcune funzionalità in base al nome della funzionalità, non è facile per tutte.

Il seguente elenco è da una versione di Windows 10 Pro 1809

  • FeatureName: Printing-PrintToPDFServices-Features
  • FeatureName: Windows-Defender-Default-Definitions
  • FeatureName: Printing-XPSServices-Features
  • FeatureName: SearchEngine-Client-Package
  • FeatureName: MSRDC-Infrastructure
  • 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-WebSocket
  • 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: US-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
  • FeatureName: Microsoft-Windows-NetFx4-US-OC-Package
  • FeatureName: Microsoft-Windows-Client-EmbeddedExp-Package
  • FeatureName: Microsoft-Windows-NetFx3-WCF-OC-Package
  • FeatureName: 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: amministrazione NFS
  • FeatureName: contenitori
  • FeatureName: SmbDirect
  • FeatureName: MultiPoint-Connector
  • FeatureName: MultiPoint-Connector-Services
  • FeatureName: MultiPoint-Tools
  • FeatureName: AppServerClient
  • FeatureName: Internet-Explorer-Opzionale-amd64

Visualizza le informazioni sulle funzioni

powershell-display information about features

È possibile utilizzare il parametro -featurename Example per visualizzare informazioni dettagliate su una funzionalità a cui si è interessati.

Il comando get-windowsoptionalfeature -online -featurename NetFx 3 ad esempio rivela che questo installa .Net Framework 3.5 sul sistema. È inoltre disponibile un collegamento Internet su cui è possibile fare clic per cercare ulteriori informazioni online.

Abilita o disabilita una funzione opzionale

È possibile utilizzare i comandi di PowerShell per abilitare o disabilitare le funzionalità opzionali su un computer Windows 10.

I comandi Enable-WindowsOptionalFeature -FeatureName e Disable-WindowsOptionalFeature -FeatureName vengono utilizzati per questo.

Per darti due esempi per mostrarti come funziona:

  • Enable-WindowsOptionalFeature -Online -FeatureName 'NetFx3' -Tutto - Questo comando installa Net Framework 3.5 sul computer su cui viene eseguito il comando.
  • Disabilita-WindowsOptionalFeature -Online -FeatureName 'NetFx3' - Questo comando disabilita nuovamente la funzione.

Il parametro -All indica a Windows di installare anche eventuali dipendenze. Quindi, se per l'installazione della funzione selezionata è necessaria una funzionalità principale, viene installata anche questa. Nota: Disable non supporta il parametro -All.

PowerShell

Per Windows

Scarica ora

risorse