Complete-VMFailover
Syntax
Complete-VMFailover
[-CimSession <CimSession[]>]
[-ComputerName <String[]>]
[-Credential <PSCredential[]>]
[-VMName] <String[]>
[-Passthru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Complete-VMFailover
[-VM] <VirtualMachine[]>
[-Passthru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
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.
Required Parameters
Specifies the virtual machine whose failover process is to be completed.
Type: | VirtualMachine[] |
Position: | 0 |
Default value: | None |
Accept pipeline input: | True (ByValue) |
Accept wildcard characters: | False |
Specifies the name of the virtual machine whose failover process is to be completed.
Type: | String[] |
Position: | 0 |
Default value: | None |
Accept pipeline input: | True (ByValue) |
Accept wildcard characters: | False |
Optional Parameters
Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.
Type: | CimSession[] |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
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: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies one or more user accounts that have permission to perform this action. The default is the current user.
Type: | PSCredential[] |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Indicates that this cmdlet returns the Microsoft.HyperV.PowerShell.VirtualMachine on which it operates. By default, this cmdlet does not return a value.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Outputs
None by default; Microsoft.HyperV.PowerShell.VirtualMachine if PassThru is specified.