PowerShell Logo Small

Move-VM



This is the built-in help made by Microsoft for the command 'Move-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

Moves a virtual machine to a new Hyper-V host.

SYNTAX


Move-VM [-Name] <String> [-DestinationHost] <String> [-AsJob] [-ComputerName <String[]>] [-DestinationStoragePath <String>] [-IncludeStorage] [-Passthru] [-ResourcePoolName
<String>] [-RetainVhdCopiesOnSource] [-SmartPagingFilePath <String>] [-SnapshotFilePath <String>] [-Vhds <Hashtable[]>] [-VirtualMachinePath <String>] [-Confirm] [-WhatIf]
[<CommonParameters>]
Move-VM [-CompatibilityReport] <VMCompatibilityReport> [-AsJob] [-Passthru] [-Confirm] [-WhatIf] [<CommonParameters>]
Move-VM [-VM] <VirtualMachine> [-DestinationHost] <String> [-AsJob] [-DestinationStoragePath <String>] [-IncludeStorage] [-Passthru] [-ResourcePoolName <String>]
[-RetainVhdCopiesOnSource] [-SmartPagingFilePath <String>] [-SnapshotFilePath <String>] [-Vhds <Hashtable[]>] [-VirtualMachinePath <String>] [-Confirm] [-WhatIf]
[<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Move-VM cmdlet moves a virtual machine to a new Hyper-V host.



<

RELATED LINKS


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

REMARKS

<

Examples


Example 1

PS C:\> Move-VM "Test VM" remoteServer



Moves a virtual machine test VM to a remote computer remoteServer when the virtual machine is stored on an SMB share.




Example 2

PS C:\>Move-VM "Test VM" remoteServer –IncludeStorage –DestinationStoragePath D:\TestVM



Moves virtual machine test VM to remote computer remoteServer, and moves all files associated with the virtual machine to D:\TestVM on the remote computer.




Example 3

PS C:\>Move-VM "Test VM" remoteServer –VirtualMachinePath D:\TestVM\Config –SnapshotFilePath D:\TestVM\Snapshots –SmartPagingFilePath D:\TestVM\SmartPaging –IncludeStorage
–VHDs @(@{"SourceFilePath" = "C:\TestVM\Disk1.VHDX"; "DestinationFilePath" = "D:\TestVM\Disks\Disk1.VHDX"}, @{"SourceFilePath" = "C:\TestVM\Disk2.VHDX";
"DestinationFilePath" = "D:\TestVM\Disks\Disk2.VHDX"})



Moves a virtual machine Test VM to a remote computer remoteServer and places the files associated with the virtual machine in the specified locations under D:\TestVM on the
remote computer.