Windows – Translate name of Windows Feature from Powershell to DISM

dismpowershellwindowswindows-server-2016

I have a list of Windows Feature I want to install with DISM but I only know what their names are when using PowerShell.

Is there a way to quickly "translate" these names? It's more than a handful:

  1. NET-Framework-45-Features
  2. RPC-over-HTTP-proxy
  3. RSAT-Clustering
  4. RSAT-Clustering-CmdInterface
  5. RSAT-Clustering-Mgmt
  6. RSAT-Clustering-PowerShell
  7. Web-Mgmt-Console
  8. WAS-Process-Model
  9. Web-Asp-Net45
  10. Web-Basic-Auth
  11. Web-Client-Auth
  12. Web-Digest-Auth
  13. Web-Dir-Browsing
  14. Web-Dyn-Compression
  15. Web-Http-Errors
  16. Web-Http-Logging
  17. Web-Http-Redirect
  18. Web-Http-Tracing
  19. Web-ISAPI-Ext
  20. Web-ISAPI-Filter
  21. Web-Lgcy-Mgmt-Console
  22. Web-Metabase
  23. Web-Mgmt-Console
  24. Web-Mgmt-Service
  25. Web-Net-Ext45
  26. Web-Request-Monitor
  27. Web-Server
  28. Web-Stat-Compression
  29. Web-Static-Content
  30. Web-Windows-Auth
  31. Web-WMI
  32. Windows-Identity-Foundation
  33. RSAT-ADDS

So I would like something other than toggling the feature with PowerShell and check for changes in the dism command's output. Hopefully there's a better way… 🙂

Best Answer

It's usually a bad idea to install Server Features with DISM. Install-WindowsFeature can target offline images if that's what you're trying. Online, Install-WindowsFeature integrates with plug-ins from the various role and feature teams that may do additional configuration or checks to ensure your server stays healthy.

That said, to answer your specific question and keeping in mind the "buyer beware" comments above...

Get-WindowsFeature <featurename> |% { $_.AdditionalInfo.InstallName }

I was the dev manager for this feature area, so please trust me when I there are very few reasons to go the DISM route - but let's discuss in comments if you're in that category. I do also have a code snippet someplace that will capture before and after doing an install, and can create the equivalent DISM command line.