Complete-VMFailover
Completes a virtual machine's failover process on the Replica server. Removes all recovery points on a failed over virtual machine.
Syntax
Complete-VMFailover
[-VMName] <String[]>
[-ComputerName <String[]>]
[-PassThru]
[-Confirm]
[-WhatIf]
Complete-VMFailover
[-VM] <VirtualMachine[]>
[-PassThru]
[-Confirm]
[-WhatIf]
Description
The Complete-VMFailover cmdlet completes a virtual machine's failover process on the Replica server. The recovery point, on which the virtual machine is failed over, is committed and all other recovery points are removed. Failover cannot be canceled after the recovery points are removed.
Examples
Example 1
PS C:\>Complete-VMFailover VM01
This command completes the failover process of a virtual machine named VM01, thereby deleting all other recovery points on the server.
Example 2
PS C:\>Complete-VMFailover *
This command completes the failover process of all virtual machines on the local host for which the failover process has been started.
Parameters
-ComputerName
Specifies one or more Hyper-V hosts on which the failover process is to be completed. NetBIOS names, IP addresses, and fully-qualified domain names are allowable. The default is the local computer - use "localhost" or a dot (".") to specify the local computer explicitly.
Type: | String[] |
Position: | Named |
Default value: | . |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PassThru
Specifies that an object is to be passed through to the pipeline representing the virtual machine whose failover process is to be completed.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VM
Specifies the virtual machine whose failover process is to be completed.
Type: | VirtualMachine[] |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VMName
Specifies the name of the virtual machine whose failover process is to be completed.
Type: | String[] |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | True |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Outputs
None
Default
Microsoft.Virtualization.Powershell.VirtualMachine
If -PassThru is specified.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for