PowerShell Logo Small

Repair-VM



This is the built-in help made by Microsoft for the command 'Repair-VM', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Repairs one or more virtual machines.

SYNTAX


Repair-VM [-CompatibilityReport] <VMCompatibilityReport> [-ComputerName <String[]>] [-Passthru] [-Path <String>] [-SnapshotFilePath <String>] [-Confirm] [-WhatIf]
[<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Repair-VM cmdlet corrects some issues that can impact the ability to import or move a virtual machine. If Compare-VM determines that an import or move operation would
fail for a particular VM, it returns a collection of incompatibilities that need to be fixed before the operation can succeed. Most of these incompatibilities can be fixed
by using Set-VM. However, Set-VM does not modify either the path where the VM configuration is stored or the path where the snapshot files are stored. Repair-VM handles
these two particular issues in this one specific situation.



<

RELATED LINKS


Online Version: http://go.microsoft.com/fwlink/?LinkID=306927

REMARKS

<

Examples


Example 1

PS C:\> Repair-VM –CompatibilityReport $VMCompatReport –Path C:\Test



This example changes the configuration path for a virtual machine compatibility report.




Example 2

PS C:\> Repair-VM –CompatibilityReport $VMCompatReport –SnapshotFilePath C:\Snapshots



This example adds missing snapshots to a virtual machine compatibility report.