Use powershell to add windows features


















You need an elevated PowerShell for the following commands. Tap on the Windows-key, type powershell, hold down the Ctrl-key and the Shift-key, and tap on the Enter-key to open a PowerShell prompt with administrative privileges.

The first thing you may want to do, at least when you are new to using the command, is to display the list of features that are available.

Run get-windowsoptionalfeature -online to list all available feature names and their states on the computer system. The state is either enabled or disabled. While it is easy enough to identify some features by the feature name, it is not easy for all of them. You may use the -featurename Example parameter to display detailed information about a feature that you are interested in. The command get-windowsoptionalfeature -online -featurename NetFx 3 for instance reveals that this installs the.

Net Framework 3. There is also an Internet link provided that you may click on to look up additional information online. The -All parameter tells Windows to install any dependencies as well. So, if a parent feature is required for the installation of the selected feature, it is installed as well.

Note: Disable does not support the -All parameter. Wow, those are a lot of features. I need to enable two Windows Features using Powershell. But I don't know their names or how to find them. Trying to use it will cause an error message:. Get-WindowsFeature : The target of the specified cmdlet cannot be a Windows client-based operating system. NET Framework version 3. Try this to get the names short and display names long descriptions : get-windowsfeature format-table -property name,displayname -AutoSize.

Export configuration settings. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Pro: Which Is Best for You? Whether you want to add additional features or make the apps list less cluttered by removing additional components, there are a few ways to install and uninstall optional features in Windows Microsoft has migrated a lot of Control Panel features to the Windows 11 settings app, but the large-scale migration is yet to happen.

As a result, some critical features, including a few optional features such as Hyper-V, are still only available in the classic Windows Features dialog. Some features may require a system restart to start working. However, you can also use it to install and configure additional Windows features. Whether you want to enable Hyper-V for virtualization or. 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. 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. Enabling or disabling a feature is pretty simple, the feature name is again case and space sensitive. Performing several operations at once on the same line is possible. DISM is a powerful tool, for some more technical reading about what it can do, there is a reference document at Microsoft Technet.

NET Framework. Newer versions of Windows have the function to view optional features built in. 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. The where statement checks the state of the feature and filters the list accordingly.

For example, NetFx3 has a default state of DisabledWithPayloadRemoved which means the feature is disabled and its files are not on the system.



0コメント

  • 1000 / 1000