| Scenario | Command | |----------|---------| | Migrated parent to new folder | Repair-VHD -Path .\child.avhdx -ParentPath D:\NewLocation\parent.vhdx | | Replaced parent with identical data but new file | Repair-VHD -Path .\child.avhdx -ParentPath .\new-parent.vhdx | | Automated re-parenting in a failover script | Get-ChildItem *.avhdx \| Repair-VHD -ParentPath $LatestParent |
What happens under the hood:
Repair-VHD [-Path] <String> [-Mode <RepairMode>] [-ReadOnly <Boolean>] [-CimSession <CimSession[]>] [-ComputerName <String[]>] [-Credential <PSCredential[]>] [<CommonParameters>]
| Scenario | Command | |----------|---------| | Migrated parent to new folder | Repair-VHD -Path .\child.avhdx -ParentPath D:\NewLocation\parent.vhdx | | Replaced parent with identical data but new file | Repair-VHD -Path .\child.avhdx -ParentPath .\new-parent.vhdx | | Automated re-parenting in a failover script | Get-ChildItem *.avhdx \| Repair-VHD -ParentPath $LatestParent |
What happens under the hood:
Repair-VHD [-Path] <String> [-Mode <RepairMode>] [-ReadOnly <Boolean>] [-CimSession <CimSession[]>] [-ComputerName <String[]>] [-Credential <PSCredential[]>] [<CommonParameters>]