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.
Jul 14, 2017 - FeatureName: Internet-Explorer-Optional-amd64. You may use PowerShell commands to enable or disable optional features on a Windows.
Most of these extras are of, 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.Going to Programs and Features and selecting “Turn Windows features on or off” or typing OptionalFeatures into Start will and what is available to install. From this window you can enable or disable features like, Internet Explorer, Games, XPS components, Hyper-V, Telnet and even Windows Media Player or Media Center.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 PromptIt’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. 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.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 moreThe online argument tells DISM that the local system is the target.
![Internet explorer for windows server 2016 Internet explorer for windows server 2016](/uploads/1/2/5/3/125383874/913875059.jpg)
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:dismFeatures.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” moreDISM /online /get-features /format:table find “Disabled” moreIt’s possible to get more detailed information about a selected feature.DISM /online /get-featureinfo /featurename:feature nameThe 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 nameDISM /online /enable-feature /featurename:feature namePerforming 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. View, Add or Remove Windows Features Via PowerShellPowerShell is Microsoft’s scripting language based around the.NET Framework.
It’s mainly used for administering and configuring local and remote systems and you can also use it for the same task of viewing, adding or removing optional Windows features. It’s possible to use the DISM tool directly in Powershell but there’s also a set of integrated commands that work in a similar way. PowerShell Optional Features in Windows 8.1 and 10Newer 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.get-windowsoptionalfeature -online ft moreLike 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.get-windowsoptionalfeature -online where state -like disabled. ft moreget-windowsoptionalfeature -online where state -like enabled.
ft moreThe where statement checks the state of the feature and filters the list accordingly. The reason to use -like and the. wildcard is some features don’t match the words exactly. For example, NetFx3 has a default state of DisabledWithPayloadRemoved which means the feature is disabled and its files are not on the system.
As a result only “-like disabled” won’t show it in the list.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.get-windowsoptionalfeature -online where featurename -like.hyper-v. ftTo get more detailed information about a specific feature:get-windowsoptionalfeature -online -featurename feature nameThis 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. I had the same issue on Windows 10. I found some articles that said to place a copy of Windows 10 on my local drive and then use command line to reinstall.NET 3.5.
Here is the command I used below. You will have to change the a path if you place your Windows 10 folder somewhere else other than C:C:WINDOWSsystem32DISM.EXE /Online /Add-Capability /CapabilityName:NetFx3 /Source:C:Windows10sourcessxsDeployment Image Servicing and Management toolVersion: 10.0.15063.0Image Version: 10.0.15063.0100.0%The operation completed successfully.C:WINDOWSsystem32.
DisclaimerThe sample scripts are not supported under any Microsoft standard support program or service. The sample scripts are provided AS IS without warranty of any kind. Microsoft further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall Microsoft, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if Microsoft has been advised of the possibility of such damages.