Contact Info

Crumbtrail

ActiveXperts.com » Administration » Powershell » Powershell 3.0 » Repair-WindowsImage

Repair-WindowsImage - Powershell 3.0 CmdLet

ActiveXperts Network Monitor ships with integrated Powershell scripts to monitor complex network. The scripts run out of the box
Download the ActiveXperts Network Monitor FREE version now »

Repair-WindowsImage

Short description
Repairs a Windows image in a WIM or VHD file.

Syntax
Repair-WindowsImage [-CheckHealth [<SwitchParameter>]] [-LimitAccess [<SwitchParameter>]] [-LogLevel <LogLevel>] [-LogP
ath <String>] [-NoRestart [<SwitchParameter>]] [-RestoreHealth [<SwitchParameter>]] [-ScanHealth [<SwitchParameter>]] [
-ScratchDirectory <String>] [-Source <String[]>] [-SystemDrive <String>] [-WindowsDirectory <String>] -Online [<SwitchP
arameter>] [<CommonParameters>]
Repair-WindowsImage [-CheckHealth [<SwitchParameter>]] [-LimitAccess [<SwitchParameter>]] [-LogLevel <LogLevel>] [-LogP
ath <String>] [-NoRestart [<SwitchParameter>]] [-RestoreHealth [<SwitchParameter>]] [-ScanHealth [<SwitchParameter>]] [
-ScratchDirectory <String>] [-Source <String[]>] [-SystemDrive <String>] [-WindowsDirectory <String>] -Path <String> [<
CommonParameters>]





Description
The Repair-WindowsImage cmdlet repairs a Windows image in a WIM or VHD file.

Use the Online parameter to specify the running operating system on your local computer, or use the Path parameter to s
pecify the location of a mounted Windows image.

The LimitAccess parameter prevents access to Windows Update (WU) as a Source for repairing online images.

The CheckHealth parameter checks whether the image has been flagged as corrupted by a failed process and whether the co
rruption can be repaired.

The ScanHealth parameter scans the image for component store corruption. This operation will take several minutes.

The RestoreHealth parameter scans the image for component store corruption, and then performs repair operations automat
ically. This operation will take several minutes.

The Source parameter specifies the location of known good versions of files that can be used for the repair, such as a 
path to the root directory of a mounted image.

CheckHealth, ScanHealth, RestoreHealth, Source, and LimitAccess can only be used when servicing Windows® 8 or Windows S
erver® 2012 images.