To get the list of all features(feature names are in the second column, Windows PowerShell cmdlets are not case-sensitive):
To uninstall completely a feature:
Uninstall-WindowsFeature featurename -remove
If -remove is not used the feature will be listed as available, however, it won’t be removed from the harddrive.
To install a feature after it’s removed we need an installation wim file as a source.
To Mount a Windows WIM to the file system:
- Get Info what’s in the wim file, features cannot be mixed, that’s why indexes are important – if core is installed then find which index belongs to core, because wim file contains more than one windows editions
dism /get-wiminfo /wimfile:wimfilepath (Example if installation media is in D drive dism /get-wiminfo /wimfile:d:\sources\install.wim)
2. After finding the correct edition, let’s say 2 create a folder in the desired location, let’s say E:\Sources
3. Mount the wim
dism /mount-wim /wimfile:d:\sources\install.wim /index:2 /mountdir:E:\Sources /readonly
4. Install-WindowsFeature featurename -source:E:\Sources\Windows\WinSxS