- Включение и отключение компонентов Windows 10
- Работаем с Windows Features
- Управление Features on Demand (FOD)
- Установка и переустановка пакетов языков (Language Interface Packs, LIP)
- Enable or Disable Windows Features Using DISM
- To mount an offline image for servicing
- To find available Windows features in an image
- To enable Windows features
- To restore removed Windows features
- To disable Windows features
- To remove Windows features for on-demand installation
- To enable or disable Windows features by using DISM and an answer file
- To commit changes on an offline image
- How to Enable or Disable Optional Windows Features
- April 2021 Update:
- Explore Windows features using the command prompt.
- Viewing, adding or deleting Windows functions from PowerShell
- Using an external installation source
Включение и отключение компонентов Windows 10
Как известно, Windows 10 отличается набором компонентов от предыдущих версий операционных систем Windows. Зачастую требуется их включить или выключить, чтобы они не потребляли системные ресурсы, да и просто не мешали. В этой статье мы рассмотрим как это сделать быстрее и эффективнее.
Начнем с того, что существует два основных способа работы с компонентами (они еще называются features) — утилита DISM и командлеты Powershell. И то и другое встроено в Windows 10, в отличие от Windows 7, где dism можно было добавить или установив пакет Windows ADK, или руками скопировав dism.exe с другого компьютера.
Сразу отмечу, что утилиту dism и среду powershell для работы с системой необходимо запускать от имени администратора, даже если ваш аккаунт уже находится в группе локальных админов. Итак, вы или находите cmd или windows powershell в меню и, кликнув правой кнопкой мышки, выбираете «Запуск от имени администратора».
В Windows 10 есть понятие Features и Capabilities. Первое — это привычные нам компоненты, которые можно найти в Панели управления -> Программы и компоненты -> Включение и отключение компонентов Windows. То есть это встраиваемые модули, которые выполняют определенный сервисный функционал.
Capabilities — это дополнительные возможности, которые расширяют возможности интерфейса и увеличивают удобство пользователя. Среди них — Language packs, наборы шрифтов. Да, Microsoft удалил часть нестандартных шрифтов, которые теперь вынесены в опциональные компоненты. Скачать эти компоненты можно в виде ISO файла с сайта Volume Licensing Service Center или напрямую через Internet и графический интерфейс Windows. Такую концепцию Microsoft назвала Features on Demand (FOD). Их в более ранних версия Windows не было.
Работаем с Windows Features
Итак, список установленных компонентов можно посмотреть командой
Dism /online /Get-Features
Вот как в Powershell можно получить список всех компонентов командлетами Get-WindowsFeature (для Windows Server) или Get-WindowsOptionalFeature (Windows 10):
Чтобы получить список отключенных компонентов, введите:
Get-WindowsOptionalFeature -Online | ? state -eq ‘disabled’ | select featurename
Этот список также можно вывести в файл (для windows Server):
Get-WindowsFeature | Where-Object <$_.Installed -match “True”>| Select-Object -Property Name | Out-File C:\Temp\WindowsFeatures.txt
Посмотрев список названий и их состояние, можно использовать эти названия для того, чтобы компоненты включить или выключить:
Dism /online /Enable-Feature /FeatureName:TFTP /All
ключ /All позволяет включить также все дочерние компоненты;
Установка компонентов через Powershell выполняется командой Enable-WindowsOptionalFeature.
Enable-WindowsOptionalFeature -Online -FeatureName RSATClient-Roles-AD-Powershell
Параметр -All включает все дочерние компоненты.
Dism /online /Disable-Feature /FeatureName:TFTP
Аналогично, через Powershell это можно сделать командой Disable-Windowsoptionalfeature -online -featureName [feature name].
Обратите внимание, некоторые фичи имеют разные названия в Windows 7 и Windows 10. Например, RSAT в Windows 7 — это RemoteServerAdministrationTools, а в Windows 10 — RSATclient.
Управление Features on Demand (FOD)
Если вы устанавливаете их через графический интерфейс, то вам необходимо пройти “System –> App & features –> Manage optional features” и нажать знак + напротив необходимых компонентов.
Чтобы сделать это автоматизированно через командную строку, наберите чтобы получить список доступных компонентов:
DISM.EXE /Online /Get-Capabilities
или на Powershell:
Как и прежде, запомните название необходимых вам компонентов, чтобы включить их командой (на примере .Net Framework 3):
DISM.EXE /Online /Add-Capability /CapabilityName:NetFx3
или на Powershell:
Add-WindowsCapability –Online -Name NetFx3
Если же у вас нет доступа в Интернет, то есть выход. Итак, вы скачиваете ISO образ диска с FOD компонентами с сайта Volume Licensing Service Center. Файлы будут разные для разных релизов Windows 10 — 1511, 1607, 1703, 1709. Важно помнить, что компоненты одного релиза не подходят к другому. Если вы сделаете in-place upgrade (установка одного релиза поверх другого через обновление), то несовместимые установленные компоненты будут удалены без вашего желания! Да, Microsoft удаляет то, что считает несовместимым при обновлении.
Так вот, ISO файл содержит набор неизвестных и сложных для понимания файлов с расширением cab. Вот чудесный файлик на сайта Microsoft, который обясняет назначение каждого файла. Итак, существуют следующие типы FOD:
- Microsoft-Windows-LanguageFeatures-Basic — проверка правописания для различных языков и раскладок клавиатуры;
- Microsoft-Windows-LanguageFeatures-Fonts — национальные шрифты, например, азиатские
- Microsoft-Windows-LanguageFeatures-OCR — средства для распознавания шрифтов
- Microsoft-Windows-LanguageFeatures-Handwriting — средства для распознавания рукописного ввода
- Microsoft-Windows-LanguageFeatures-TextToSpeech — средства преобразования текста в голос, используемые подсказчиком Cortana
- Microsoft-Windows-LanguageFeatures-Speech — распознавание голоса
- Microsoft-Windows-InternationalFeatures — пакеты национальных настроек, например, для Тайваня
Итак, для добавления таких FOD компонентов, используйте команды вида (замените имя компонента):
Dism /Online /Add-Capability /CapabilityName:Language.Basic
Для удаления FOD:
Dism /Online /Remove-Capability /CapabilityName:Language.Basic
Установка и переустановка пакетов языков (Language Interface Packs, LIP)
Язык интерфейса Windows можно поменять, установив так называемые LIP. ранее они назывались MUI (Multi user interface). Файлы LIP выглядят так: Microsoft-Windows-Client-Language-Pack_x64_es-es.cab для испанского языка. Выглядеть установка будет примерно так:
Dism /Add-Package /online /PackagePath:»C:\Languages\Microsoft-Windows-Client-Language-Pack_x64_fr-fr.cab»
Dism /Remove-Package /online /PackageName:Microsoft-Windows-Client-LanguagePack-Package
В следующей статье мы поговорим как с помощью DISM и Powershell управлять так называемыми Modern-приложениями AppX.
Enable or Disable Windows Features Using DISM
The Deployment Image Servicing and Management (DISM) tool is a command-line tool that is used to modify WindowsВ® images. You can use DISM to enable or disable Windows features directly from the command prompt, or by applying an answer file to the image. You can enable or disable Windows features offline on a WIM or VHD file, or online on a running operating system.
To mount an offline image for servicing
Open a command prompt with administrator privileges.
To use DISM from an installation of the Windows Assessment and Deployment Kit (WindowsВ ADK), locate the WindowsВ ADK servicing folder and navigate to this directory. By default, DISM is installed at C:\Program Files (x86)\Windows Kits\10.0\Assessment and Deployment Kit\Deployment Tools\ in WindowsВ 10, C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Deployment Tools\ in WindowsВ 8.1and C:\Program Files (x86)\Windows Kits\8.0\Assessment and Deployment Kit\Deployment Tools\ in WindowsВ 8.
DISM is available in:
- WindowsВ 10
- WindowsВ 8.1
- WindowsВ 8
- Windows ServerВ 2016 Technical Preview
- WindowsВ Server 2012 R2
- Windows ServerВ 2012
- Windows Preinstallation Environment (WinPE) for WindowsВ 10
- WinPE 5.0
- WinPEВ 4.0
You can install DISM and other deployment and imaging tools, such as Windows System Image Manager (WindowsВ SIM), on another supported operating system from the WindowsВ ADK. For more information, see DISM Supported Platforms.
Use the /Get-ImageInfo option to retrieve the name or index number for the image that you want to modify. An index or name value is required for most operations that specify an image file.
For example, at the command prompt type:
Mount the offline Windows image. For example, type:
To find available Windows features in an image
List all of the features available in the operating system. For example, type:
To service an offline image, specify the location of the mounted image directory. For example, type:
You can use >featurelist.txt to redirect the output of the command to a text file that is named featurelist.
Review the list of features to find the feature that you want to enable, disable, remove, or restore.
Use /Get-FeatureInfo to list information about the specific feature you are interested in. For example, type:
To enable Windows features
Enable a specific feature in the image. You can use the /All argument to enable all of the parent features in the same command. For example, type:
To service an offline image, specify the location of the mounted image directory. For example, type:
Optional: Get the status of the feature you have enabled. For example, type:
If the status is Enble Pending, you must boot the image in order to enable the feature entirely.
To restore removed Windows features
Enable a specific feature in the image. If you do not specify a source, DISM will look in the default location specified by group policy for the required files needed to enable the feature For more information, see Configure a Windows Repair Source.
If the files are not found in the default location, DISM will contact Windows Update (WU) for the required files. You can use the /LimitAccess argument to prevent DISM from contacting WU.
If you specify multiple /Source arguments, the files are gathered from the first location where they are found and the rest of the locations are ignored.
For example, type:
To service an offline image, specify the location of the mounted image directory. For example, type:
Optional: Get the status of the feature you have enabled. For example, type:
If the status is EnablePending, you must boot the image in order to enable the feature entirely.
To disable Windows features
Disable a specific feature in the image. For example, type:
To service an offline image, specify the location of the mounted image directory. For example, type:
Optional: Use DISM /GetFeatureInfo to get the status of the feature you have disabled. For example, type:
If the status is DisablePending, you must boot the image in order to disable the feature entirely.
To remove Windows features for on-demand installation
Remove a specific feature in the image without removing the feature’s manifest from the image. This option can only be used when servicing WindowsВ 10, WindowsВ 8.1, WindowsВ 8, Windows ServerВ 2016 Technical Preview, WindowsВ Server 2012 R2, or Windows ServerВ 2012. For more information, see Configure a Windows Repair Source.
For example, type:
To service an offline image, specify the location of the mounted image directory. For example, type:
Optional: Use DISM /GetFeatureInfo to get the status of the feature you have disabled. For example, type:
The status is Disabled. Beginning with Windows 10, the payload is not removed from Windows client SKUs in order to support push-button reset. The payload is removed from Windows Server SKUs.
To enable or disable Windows features by using DISM and an answer file
In WindowsВ SIM, open an existing catalog by clicking Select a Windows Image on the File menu and specifying the catalog file type (.clg) in the drop-down list, or create a new catalog by clicking Create Catalog on the Tools menu.
Expand the catalog in the Windows Image pane, and then expand Packages.
Expand Foundation, and right-click Microsoft-Windows-Foundation-Package.
Click Add to Answer File.
Click Enabled or Disabled next to the features that you intend to enable or disable. Click the arrow to select the opposite choice.
You might have to expand an item to see all its children. You must enable the parent if any one of its children are enabled.
NoteВ В You can’t restore or remove a Windows feature for features on demand with an unattended answer file.
Click Tools on the main menu, and then click Validate Answer File.
Correct any errors that appear in the Messages pane, and save the answer file.
At the command prompt, type the following command to apply the unattended answer file to the image.
To service an offline image, specify the location of the mounted image directory. For example, type:
To commit changes on an offline image
Commit the changes and unmount the image. For example, type:
How to Enable or Disable Optional Windows Features
The Windows operating system comes with many add-ons and components that can extend Windows functionality without using third-party software. Some of these components are enabled or installed by default. But not all of them need to be turned on because they affect the performance of your computer. In addition, not all users need to have all these functions enabled. Some components are also required by third-party software to work properly, such as .NET Framework 3.5.
So, what should we turn on and off? We have compiled a list of some of the features available on Windows 10 Professional because most of the most interesting features, such as the Hyper-V virtualization server, require Windows 10 Professional. If you are using Windows 10 Home Edition, you only have some of these features. If you use Windows 10 Enterprise or Education, you will have even more features. These are just some of the most common characteristics you may encounter.
- NET Framework 3.5 (includes.NET 2.0 and 3.0): You will need this installation to run the applications written for these versions of.NET. Windows automatically installs them when an application needs them.
- NET Framework 4.6 Advanced Services: These functions are also automatically installed if necessary. They are only necessary to run the applications that need them.
- Active Directory Lightweight Directory Services: This provides an LDAP (Lightweight Directory Access Protocol) server. It works as a Windows service and provides a directory to authenticate users on a network. It is a lightweight alternative to a full Active Directory server and will only be useful in some corporate networks.
- Embedded Shell Launcher: This function is necessary if you want to replace the Windows 10 Explorer.exe shell with a custom shell. The Microsoft documentation recommends using this feature to configure a traditional Windows application in kiosk mode.
п»ї
April 2021 Update:
We now recommend using this tool for your error. Additionally, this tool fixes common computer errors, protects you against file loss, malware, hardware failures and optimizes your PC for maximum performance. You can fix your PC problems quickly and prevent others from happening with this software:
- Step 1 : Download PC Repair & Optimizer Tool (Windows 10, 8, 7, XP, Vista – Microsoft Gold Certified).
- Step 2 : Click “Start Scan” to find Windows registry issues that could be causing PC problems.
- Step 3 : Click “Repair All” to fix all issues.
To view and enable and disable optional Windows features
Explore Windows features using the command prompt.
To obtain a list of Windows functions at the command prompt, do the following:
Open the command prompt in the administrator mode.
Type the following command
DISM /online /get-features /format:table | more
It displays all the enabled or disabled functions on your computer. Here format:table and others are optional and are used to improve the readability of features.
Viewing, adding or deleting Windows functions from PowerShell
PowerShell is Microsoft’s scripting language based on the.NET framework. It is mainly used to manage and configure local and remote systems, and you can also use it for the same task of viewing, adding or removing optional Windows features. It is possible to use the DISM tool directly in Powershell, but there is also a set of integrated commands that work in a similar way.
Using an external installation source
You can also get the latest features from an updated offline source.
This source can be an ISO or other type of image, or simply a folder.
All you have to do is decide whether you want to use the Command Prompt or Windows Powershell.
If you are using the command prompt, type this command,
Dism.exe /online /enable-feature /enable-feature /enable-feature /featurename: Management of optional functions from the control panel
Although Windows 10 includes the Settings application, you still need to use the Control Panel to manage optional features on your computer. If you want to create Hyper-V virtual machines, use Internet Information Services (IIS) to configure an FTP server or add the Linux Bash command line tool.
The following describes how to enable and disable optional features in Windows 10 from the Control Panel:
- Open the Control Panel.
- Click on Programs.
- Click on the Enable or disable Windows functions link.
- In Windows Functions, check or deselect the desired function.
- Click OK to enable or disable the function.
- Restart your computer as indicated by the wizard.
CCNA, Web Developer, PC Troubleshooter
I am a computer enthusiast and a practicing IT Professional. I have years of experience behind me in computer programming, hardware troubleshooting and repair. I specialise in Web Development and Database Design. I also have a CCNA certification for Network Design and Troubleshooting.