Izmantojiet Windows PowerShell, lai instalētu izvēles funkcijas

Microsoft Windows tiek piegādāts ar tā saukto izvēles funkciju komplektu, ko lietotāji var iespējot vai atspējot, izmantojot vadības paneļa sīklietotnes "ieslēgt vai izslēgt Windows funkcijas".

Tas lielākoties darbojas labi, taču ir nepieciešams operētājsistēmas vadības paneli atvērt, ja vien logu Funkcijas neielādējat tieši, Start ierakstot izvēles iespējas.

Lai arī lielākoties ar to pietiek, administratori var izmantot arī PowerShell, lai pārvaldītu Windows operētājsistēmas izvēles funkcijas.

Šajā rokasgrāmatā ir sniegts pārskats par to, kā darbojas operētājsistēmā Windows 10. Ņemiet vērā, ka tas var nedarboties iepriekšējās Windows versijās, piemēram, Windows 7.

Windows PowerShell: instalējiet izvēles funkcijas

Šīm komandām ir nepieciešams paaugstināts PowerShell . Pieskarieties Windows taustiņam, ierakstiet Powershell, turiet nospiestu Ctrl taustiņu un Shift taustiņu un pieskarieties Enter taustiņam, lai atvērtu PowerShell uzvedni ar administratora privilēģijām.

Uzskaitiet visas izvēles funkcijas un to statusu

Pirmā lieta, ko jūs varētu vēlēties, vismaz tad, kad esat tikai iesācējs komandas izmantošanā, ir parādīt pieejamo funkciju sarakstu.

Palaist get-windowsoptionalfeature-online, lai uzskaitītu visus datorsistēmā pieejamos funkciju nosaukumus un to stāvokļus. Stāvoklis ir iespējots vai atspējots.

Piezīme: parametrs -online nozīmē, ka darbības tiek veiktas pašreizējā ierīcē.

Lai gan ir pietiekami viegli noteikt dažas funkcijas pēc objekta nosaukuma, tām visām nav viegli.

Šis saraksts ir no Windows 10 Pro versijas 1809

  • FeatureName: Drukāšana-PrintToPDFServices-Features
  • FeatureName: Windows-Defender-Default-Definīcijas
  • FeatureName: Drukāšana-XPSpakalpojumi-līdzekļi
  • FeatureName: SearchEngine-Client-Package
  • FeatureName: MSRDC-Infrastructure
  • FeatureName: TelnetClient
  • FeatureName: TFTP
  • FeatureName: TIFFIFilter
  • FeatureName: WorkFolders-Client
  • FeatureName: LegacyComponents
  • FeatureName: DirectPlay
  • FeatureName: Iespiešanas-fonda-līdzekļi
  • 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-apakšsistēma-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-NetFxExtenibility
  • FeatureName: IIS-NetFxExtenibility45
  • FeatureName: IIS-HealthAndDiagnostics
  • FeatureName: IIS-HttpLogging
  • FeatureName: IIS-LoggingLibraries
  • FeatureName: IIS-RequestMonitor
  • FeatureName: IIS-HttpTracing
  • FeatureName: IIS-drošība
  • FeatureName: IIS-URLAuthorization
  • FeatureName: IIS-RequestFiltering
  • FeatureName: IIS-IPSdrošība
  • FeatureName: IIS-Performance
  • FeatureName: IIS-HttpCompressionDynamic
  • FeatureName: IIS-WebServerManagementTools
  • FeatureName: IIS-ManagementScriptingTools
  • FeatureName: IIS-IIS6ManagementCompatibility
  • FeatureName: IIS-datu bāze
  • FeatureName: WAS-WindowsActivationService
  • FeatureName: WAS-ProcessModel
  • FeatureName: WAS-NetFxEnvironment
  • FeatureName: WAS-ConfigurationAPI
  • FeatureName: IIS-HostableWebCore
  • FeatureName: IIS-StaticContent
  • FeatureName: IIS-DefaultDocument
  • FeatureName: IIS-direktorija pārlūkošana
  • FeatureName: IIS-WebDAV
  • FeatureName: IIS-WebSockets
  • FeatureName: IIS-ApplicationInit
  • FeatureName: IIS-ASPNET
  • FeatureName: IIS-ASPNET45
  • FeatureName: IIS-ASP
  • FeatureName: IIS-CGI
  • FeatureName: IIS-ISAPIEpaplašinājumi
  • FeatureName: IIS-ISAPIFilter
  • FeatureName: IIS-ServerSideIncludes
  • FeatureName: IIS-CustomLogging
  • FeatureName: IIS-BasicAuthentication
  • FeatureName: IIS-HttpCompressionStatic
  • FeatureName: IIS-ManagementConsole
  • FeatureName: IIS-ManagementService
  • FeatureName: IIS-WMICsaderība
  • FeatureName: IIS-LegacyScripts
  • FeatureName: IIS-LegacySnapIn
  • FeatureName: IIS-FTPServer
  • FeatureName: IIS-FTPSvc
  • FeatureName: IIS-FTPPagarināmība
  • 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-aktivizētāji
  • FeatureName: MSMQ-ADIntegration
  • FeatureName: MSMQ-HTTP
  • FeatureName: MSMQ-Multicast
  • FeatureName: MSMQ-DCOMProxy
  • FeatureName: WCF-HTTP-aktivizēšana
  • FeatureName: WCF-NonHTTP-aktivizācija
  • 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: SMB1Protokolla nolietojums
  • 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: konteineri-vienreizējās lietošanas klientsVM
  • 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-klienti
  • 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-infrastruktūra
  • FeatureName: NFS administrēšana
  • FeatureName: konteineri
  • FeatureName: SmbDirect
  • FeatureName: MultiPoint-Connector
  • FeatureName: MultiPoint-Connector-Services
  • FeatureName: MultiPoint-Tools
  • FeatureName: AppServerClient
  • FeatureName: Internet-Explorer-Izvēles-amd64

Parādīt informāciju par funkcijām

Jūs varat izmantot parametru -featurename Piemērs, lai parādītu detalizētu informāciju par jūs interesējošo līdzekli.

Piemēram, komanda get-windowsoptionalfeature -online -featurename NetFx 3 atklāj, ka tā sistēmā instalē .Net Framework 3.5. Pastāv arī interneta saite, ja jūs varat noklikšķināt uz, lai tiešsaistē meklētu papildu informāciju.

Iespējot vai atspējot izvēles funkciju

Varat izmantot PowerShell komandas, lai Windows 10 mašīnā iespējotu vai atspējotu izvēles funkcijas.

Tam tiek izmantotas komandas Enable-WindowsOptionalFeature -FeatureName un Disable-WindowsOptionalFeature -FeatureName.

Sniegsim divus piemērus, kas parādīs, kā tas darbojas:

  • Enable-WindowsOptionalFeature -Online -FeatureName "NetFx3" -All - Šī komanda instalē Net Framework 3.5 datorā, kurā komanda darbojas.
  • Disable-WindowsOptionalFeature -Online -FeatureName "NetFx3" - šī komanda vēlreiz atspējo šo funkciju.

Parametrs -Viss norāda Windows instalēt arī jebkādas atkarības. Tātad, ja atlasītās funkcijas instalēšanai ir nepieciešama vecāku funkcija, tā tiek instalēta arī. Piezīme. Atspējošana neatbalsta parametru -All.

Resursi

  • Microsoft Technet: iespējot-WindowsOptionalFeature
  • Microsoft Technet: Disable-WindowsOptionalFeature
  • Microsoft Technet: Get-WindowsOptionalFeature