PowerShell Logo Small

Move-VMStorage



This is the built-in help made by Microsoft for the command 'Move-VMStorage', 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 the storage of a virtual machine.

SYNTAX


Move-VMStorage [-VMName] <String> [-AllowUnverifiedPaths] [-AsJob] [-ComputerName <String[]>] [-ResourcePoolName <String>] [-RetainVhdCopiesOnSource] [-SmartPagingFilePath
<String>] [-SnapshotFilePath <String>] [-Vhds <Hashtable[]>] [-VirtualMachinePath <String>] [-Confirm] [-WhatIf] [<CommonParameters>]
Move-VMStorage [-VMName] <String> [-DestinationStoragePath] <String> [-AllowUnverifiedPaths] [-AsJob] [-ComputerName <String[]>] [-ResourcePoolName <String>]
[-RetainVhdCopiesOnSource] [-Confirm] [-WhatIf] [<CommonParameters>]
Move-VMStorage [-VM] <VirtualMachine> [-DestinationStoragePath] <String> [-AllowUnverifiedPaths] [-AsJob] [-ResourcePoolName <String>] [-RetainVhdCopiesOnSource] [-Confirm]
[-WhatIf] [<CommonParameters>]
Move-VMStorage [-VM] <VirtualMachine> [-AllowUnverifiedPaths] [-AsJob] [-ResourcePoolName <String>] [-RetainVhdCopiesOnSource] [-SmartPagingFilePath <String>]
[-SnapshotFilePath <String>] [-Vhds <Hashtable[]>] [-VirtualMachinePath <String>] [-Confirm] [-WhatIf] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Move-VMStorage cmdlet moves the storage of a virtual machine.



<

RELATED LINKS


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

REMARKS

<

Examples


Example 1

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



Moves all files associated with a virtual machine test VM to D:\TestVM




Example 2

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



Moves all files associated with a virtual machine test VM to different locations under D:\TestVM.