Installing Removed Windows Features
To reinstall features with the state, “Disabled with payload removed”
, an administrator runs Install-WindowsFeature
cmdlet with the parameter, Source
, for specifying the location of an installation source. And the source must be from the exact same version of Windows for the reinstallation to work. Without the parameter, Source, PowerShell will use Windows Update by default to look for an installation source. The following statement restores server graphical shell from a side-by-side folder is in D drive, for example.
Install-WindowsFeature Server-Gui-Shell –Source d:\source\sxs
Comments
-
joshduffney almost 2 years
I'm working with an image from Windows Server 2016 that has all the extra Windows features removed. I'm attempting to add back in the features required to make it a domain controller 'ad-domain-services', but it always errors out giving me an errors saying "The source files could not be downloaded". I have the Windows Server 2016 ISO mounted and have tried the following commands. How can you tell where you need to import features from?
Install-WindowsFeature ad-domain-services -Source 'D:\sources\sxs' Install-WindowsFeature ad-domain-services -Source 'wim:D:\sources\install.wim:2'
-
joshduffney over 7 yearsI appreciate the comment, but I've already tried that, it doesn't find the source files necessary to install the feature rsat-adds I had to use the below command and specify the install.wim. This does not work however for the ad-domain-services feature. Install-WindowsFeature ad-domain-services -Source 'wim:D:\sources\install.wim:2'
-
Farhad Farahi over 7 yearsDo you have internet connectivity on the host? so it can pull the required files from microsoft repositories via windows update? if so , do not specify the -source and try
Install-WindowsFeature ad-domain-services