DISM repair Windows Server 2016

Repair Windows Server 2016 with DISM

dism /online /cleanup-image /scanhealth
dism /online /cleanup-image /checkhealth
dism /online /cleanup-image /restorehealth /source:WIM:d:\sources\install.wim:2 /limitaccess
sfc /scannow

About the WIN Index above: The Index used above (2) is for the Desktop Edition, if you have a Server Core installation, please use 1:

dism /online /cleanup-image /restorehealth /source:WIM:d:\sources\install.wim:1 /limitaccess

Run Windows Update

Here should have been a screenshot of the successful command

dism /online /cleanup-image /restorehealth /source:WIM:d:\sources\install.wim:2 /limitaccess” 

-but you get the drift

A quick tip on sfc /scannow: if this hangs indefinetly you can go ahead and press ctrl+c

This wont’t break the check it will make the scan continue past the issue.

More articles

Optional features

Check available optional features: DISM /Online /Get-Capabilities Install an optional feature: DISM /Online /Add-capability /capabilityname:Media.MediaFeaturePack~~~~0.0.1.0

Read More »

AD retention period

Check AD retention tombstone value: Import-Module ActiveDirectory $ADForestconfigurationNamingContext = (Get-ADRootDSE).configurationNamingContext $DirectoryServicesConfigPartition = Get-ADObject -Identity “CN=Directory Service,CN=Windows NT,CN=Services,$ADForestconfigurationNamingContext” -Partition $ADForestconfigurationNamingContext -Properties *

Read More »