Disable-VMMigration

Disables migration on one or more virtual machine hosts.

Syntax

Disable-VMMigration
       [[-ComputerName] <String[]>]
       [-Passthru]
       [-Confirm]
       [-WhatIf]

Description

The Disable-VMMigration cmdlet disables migration on one or more virtual machine hosts.

Examples

Example 1

PS C:\>Disable-VMMigration

Disables live migration on the local Hyper-V host.

Parameters

-ComputerName

Specifies one or more Hyper-V hosts on which migration is to be disabled. 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:1
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 a Microsoft.Virtualization.Powershell.Host object is to be passed through to the pipeline representing each virtual machine host on which migration is disabled.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-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 by default; Microsoft.Virtualization.Powershell.Host if -PassThru is present.