Add and remove windows features

Включение и отключение компонентов Windows 10

Как известно, Windows 10 отличается набором компонентов от предыдущих версий операционных систем Windows. Зачастую требуется их включить или выключить, чтобы они не потребляли системные ресурсы, да и просто не мешали. В этой статье мы рассмотрим как это сделать быстрее и эффективнее.

Начнем с того, что существует два основных способа работы с компонентами (они еще называются features) — утилита DISM и командлеты Powershell. И то и другое встроено в Windows 10, в отличие от Windows 7, где dism можно было добавить или установив пакет Windows ADK, или руками скопировав dism.exe с другого компьютера.

Сразу отмечу, что утилиту dism и среду powershell для работы с системой необходимо запускать от имени администратора, даже если ваш аккаунт уже находится в группе локальных админов. Итак, вы или находите cmd или windows powershell в меню и, кликнув правой кнопкой мышки, выбираете «Запуск от имени администратора».

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):

Чтобы получить список отключенных компонентов, введите:

Этот список также можно вывести в файл (для windows Server):

Посмотрев список названий и их состояние, можно использовать эти названия для того, чтобы компоненты включить или выключить:

Dism /online /Enable-Feature /FeatureName:TFTP /All

ключ /All позволяет включить также все дочерние компоненты;

Установка компонентов через Powershell выполняется командой Enable-WindowsOptionalFeature.

Dism /online /Disable-Feature /FeatureName:TFTP

Обратите внимание, некоторые фичи имеют разные названия в 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

DISM.EXE /Online /Add-Capability /CapabilityName:NetFx3

Если же у вас нет доступа в Интернет, то есть выход. Итак, вы скачиваете ISO образ диска с FOD компонентами с сайта Volume Licensing Service Center. Файлы будут разные для разных релизов Windows 10 — 1511, 1607, 1703, 1709. Важно помнить, что компоненты одного релиза не подходят к другому. Если вы сделаете in-place upgrade (установка одного релиза поверх другого через обновление), то несовместимые установленные компоненты будут удалены без вашего желания! Да, Microsoft удаляет то, что считает несовместимым при обновлении.

Так вот, ISO файл содержит набор неизвестных и сложных для понимания файлов с расширением cab. Вот чудесный файлик на сайта Microsoft, который обясняет назначение каждого файла. Итак, существуют следующие типы FOD:

Итак, для добавления таких FOD компонентов, используйте команды вида (замените имя компонента):

Dism /Online /Add-Capability /CapabilityName:Language.Basic

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.

Читайте также:  Hp probook 4720s драйвера windows 7

DISM is available in:

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.

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.

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:

Источник

Enable and Disable Windows Features

Never use IE? You can uninstall it here!

No matter which version of Windows you use, there is a lot of features that are installed with the system by default, many of which you probably will never use. Disabling Windows features you don’t use can optimize your system, making it faster and saving precious hard disk space.

Читайте также:  Intel hd graphics 510 windows 7

This article shows you how to enable and disable features in Windows 7/8/10, Vista, and XP.

Windows Vista, 7/8/10

To turn Windows features in Windows Vista to Windows 10 on or off, click Control Panel on the Start menu. You can also click on Start and then type in control panel.

Click the Programs link.

NOTE: If you are in Classic View, the link reads Programs and Features.

Under the Programs and Features heading, click the Turn Windows features on or off link.

NOTE: If you are in the Classic View, the Turn Windows features on or off link is on the left panel.

The Windows Features dialog box displays with a “Please wait…” message, while the features list is loaded.

When the list of features displays, you can move your mouse over one of the features and view a description of that feature.

For each feature you want to turn off, select the check box to the left of the feature so there is NO check mark in the box. For example, since we are not using a Tablet PC, we decided to turn off the Tablet PC Components feature, along with some other features we don’t use. Once you have made your changes, click OK to close the Windows Features dialog box.

A dialog box displays showing the progress of the changes being made to your Windows system.

You must restart your computer for the changes to be completed. Click Restart Now if you are ready to restart the computer now. If you want to wait to restart the computer, click Restart Later.

While the computer is shutting down and again while it is starting up, the following message displays. Be sure you don’t shut off the computer while the features are being configured.

Windows XP

To turn Windows features in Windows XP, click Control Panel on the Start menu.

Click the Add or Remove Programs link (or the icon in Classic View) on the Control Panel window.

On the Add or Remove Programs dialog box, click Add/Remove Windows Components in the left panel.

A dialog box displays asking you to wait while the list of Windows features is generated.

The Windows Components Wizard displays with a list of Components. If the check box to the left of a component has a gray background, there are sub-components within that component. Click Details to view the components under that main component.

For example, the following dialog box shows the components available under the Network Services main component. You can turn on or off any of these components and click OK to accept your changes and return to the Windows Components Wizard.

For each feature you want to turn off, select the check box to the left of the feature so there is NO check mark in the box. For example, we are not using MSN Explorer or Outlook Express, in addition to some other features. Once you have made your changes, click Next.

The Configuring Components screen displays the progress of the changes being made to your system.

When the changes have been made, the Completing the Windows Components Wizard dialog box displays. Click Finish.

You must restart your computer for the changes to be completed. Click Yes if you are ready to restart the computer now. If you want to wait to restart the computer, click No.

You can turn on any of the Windows features again, if desired, simply by following these procedures and selecting the check boxes for features you want so there is a check mark in each check box. Enjoy!

Founder of Help Desk Geek and managing editor. He began blogging in 2007 and quit his job in 2010 to blog full-time. He has over 15 years of industry experience in IT and holds several technical certifications. Read Aseem’s Full Bio

Источник

Add or Remove Windows Features Via Command Prompt or PowerShell

The Windows operating system has hundreds of functions and features available to use. While the vast majority of these Windows features are available or enabled and ready to go from install, some are not and need to be switched on manually. Most of these extras are of no major use to ordinary users, but can be valuable to advanced and business users. There is an easy way to access and view what these features are by going to Control Panel.

If there’s a feature you want to install simply check the box and click OK, unchecking will remove the feature from the system. Although it won’t make much difference to the performance or running of your computer, it does make sense to turn things off you know will never be used. Fewer features installed reduces the chance of things going wrong.

This method works fine but if you want more advanced control to manipulate the features remotely or from batches or scripts, you need another way. Thankfully Windows offer two solutions to do this, by using either the command line or from PowerShell. Here we show you how.

View, Add or Remove Windows Features Via Command Prompt

It’s easily achievable to get information about, as well as install or remove features from the command line. This is possible by using the DISM (Deployment Image Servicing and Management) tool. It’s is often used for changing or injecting drivers or Windows updates into WIM images. The DISM tool is found in Windows 7, 8.1 and 10 so the following commands can be used in any of those operating systems.

Читайте также:  Airplay sdk для windows

Make sure to open a Command Prompt with administrative privileges. To do that go to Start, type cmd and press Ctrl+Shift+Enter or right click start and select Command Prompt (Admin). If you receive an “Error: 740” running DISM, it means your Command Prompt is not in admin mode.

To get a full list of available features that can be, or are are currently installed on the system:

DISM /online /get-features /format:table | more

The online argument tells DISM that the local system is the target. Format:table is optional and displays the list in a more readable table format. The more at the end is also optional and splits the list into pages. Press Space to show each subsequent page. To output the list directly to a text file you can append something like “>C:\dism_Features.txt” to the end of the line.

If you want to filter the list to show just enabled or disabled features, change the DISM command slightly. Note the Enabled and Disabled words are case sensitive and need to start with a capital letter or nothing will show.

DISM /online /get-features /format:table | find “Enabled” | more

DISM /online /get-features /format:table | find “Disabled” | more

It’s possible to get more detailed information about a selected feature.

DISM /online /get-featureinfo /featurename:[feature name]

The name of the feature is case sensitive and you have to type it in exactly as listed, including any spaces. The information will show a description of the feature and whether a reboot might be needed. Custom Properties might also display a Microsoft support page URL where you can find more details.

Enabling or disabling a feature is pretty simple, the feature name is again case and space sensitive.

DISM /online /disable-feature /featurename:[feature name]

DISM /online /enable-feature /featurename:[feature name]

Performing several operations at once on the same line is possible. This is done by appending /FeatureName:[feature name] one or more times to the command. DISM is a powerful tool, for some more technical reading about what it can do, there is a reference document at Microsoft Technet.

View, Add or Remove Windows Features Via PowerShell

PowerShell Optional Features in Windows 8.1 and 10

Newer versions of Windows have the function to view optional features built in. Make sure to run PowerShell as administrator or the commands won’t work. To view the list of features available on the system.

Like DISM, the online argument tells the command to work on the local system while the optional ft displays the results in a table and more breaks the list into pages. To filter the list into enabled or disabled features.

With PowerShell it’s no problem to use a similar command for filtering the list with specific keywords. The below example will show only the features that have the word “hyper-v” in their name.

To get more detailed information about a specific feature:

This is very similar to DISM’s get-featureinfo argument although feature names are not case sensitive here. You can also use wildcards to list several features at once. The following command will get information on all features with “media” in the name.

Adding or removing a feature is a pretty simple process:

The optional -all argument automatically adds any other features that are required for the feature you specified to work. By using two commands on the same line you can enable or disable multiple features at once

The above command first filters all features with “Hyper-V” in their name. Then those feature names are piped to the enable command to be enabled one after the other without rebooting. This causes seven Hyper-V features to be enabled in Windows 10 with a single line.

Like other Powershell commands, feature names for enabling or disabling are not case sensitive.

PowerShell Optional Features in Windows 7

Besides standard DISM commands, Windows 7’s PowerShell does not have the ability to change the optional features. For that you will need to download a third party module which adds the function.

1. Download PSClientManager from Codeplex and install it. Then open PowerShell with administrative privileges, make sure to use the correct 32-bit/64-bit version for your system.

2. Run the following commands. Note the first command is only needed if you receive an error about running scripts is disabled while trying to run the second command.

Set-ExecutionPolicy RemoteSigned (press Enter at the prompt)

PowerShell is now able to process feature commands, they are broadly similar to the commands found in newer operating systems. To get a list of all features:

To filter a name string or only show enabled/disabled features, use the following:

Adding and removing features using the PSClientManager module is again quite easy:

While the Get-ClientFeature is not case sensitive to view the features, adding and removing features is. Make sure you have the casing and spacing correct.

PSClientManager does also has another command Get-ClientFeatureInfo which shows the details of a selected feature. Sadly we couldn’t get it to work and it kept showing a blank result.

Источник

Поделиться с друзьями
Советы экспертов и специалистов
Adblock
detector