Import-VMInitialReplication

Imports initial replication files for a Replica virtual machine to complete the initial replication when using external media as the source.

Syntax

Import-VMInitialReplication
      [-VMName] <String[]>
      [-Path] <String>
      [-AsJob]
      [-ComputerName <String[]>]
      [-PassThru]
Import-VMInitialReplication
      [-VM] <VirtualMachine[]>
      [-Path] <String>
      [-AsJob]
      [-PassThru]
Import-VMInitialReplication
      [-VMReplication] <VMReplication[]>
      [-Path] <String>
      [-AsJob]
      [-PassThru]

Description

The Import-VMInitialReplication cmdlet imports initial replication files on a Replica server. It completes the initial replication of a virtual machine when external is used as the source of the files for initial replication.

Examples

Example 1

PS C:\>Import-VMInitialReplication VM01 d:\VMImportLocation\VM01

This example imports the initial replication files for a virtual machine named VM01 from location d:\VMImportLocation\VM01.

Example 2

PS C:\>Get-VMReplication | % {$path = "D:\OOBLoc\" + $_.VMName + "_" + $_.VMID; if (Test-Path $path -PathType Container) {Import-VMInitialReplication $_ $path}}

This example imports the initial replication files for a set of virtual machines using files located in D:\OOBLoc\

Required Parameters

-Path

Specifies the path of the initial replication files to import.

Type:String
Position:2
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-VM

Specifies the virtual machine for which the initial replication files are to be imported.

Type:VirtualMachine[]
Position:1
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-VMName

Specifies the name of the virtual machine for which the initial replication files are to be imported.

Type:String[]
Position:1
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:True
-VMReplication

Specifies the virtual machine replication object for which initial replication files are to be imported.

Type:VMReplication[]
Position:1
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False

Optional Parameters

-AsJob

Runs the cmdlet as a background job.

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

Specifies one or more Hyper-V hosts on which initial replication files are to be imported. 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:.
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 for which initial replication files are to be imported.

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

Outputs

None by default; Microsoft.Virtualization.Powershell.VirtualMachine if -PassThru is specified.