Monday, August 7, 2017

Install Windows Feature with DISM (without PowerShell)

Scenario:

Imagine that you can't Install-WindowsFeature (Add-WindowsFeature for 2008 R2) on Windows Server using PowerShell for some reason.

Recently I had a problem with broken WMI where I couldn't manage Windows Server features of affected server. My wish was to make Full Server backup prior to any changes with broken server using built-in "Windows Server Backup" and I couldn't install backup feature using PowerShell.

Solution:

DISM commands running from an Elevated Command Prompt (Admin) saved my life:
Dism /online /enable-feature /featurename:WindowsServerBackup
 
Deployment Image Servicing and Management tool
Version: 6.3.9600.17031

Image Version: 6.3.9600.17031
 
Enabling feature(s)
[==========================100.0%==========================]
The operation completed successfully.
Dism /online /enable-feature /featurename:WindowsServerBackupSnapin
 
Deployment Image Servicing and Management tool
Version: 6.3.9600.17031
 
Image Version: 6.3.9600.17031
 
Enabling feature(s)
[==========================100.0%==========================]
The operation completed successfully.
You can install any Windows feature in similar way. Get list of all available features and their names on server:
Dism /online /get-features /format:table | more
References: