New-AzMigrateServerReplication
Starts replication for the specified server.
Syntax
ByIdDefaultUser (Default)
New-AzMigrateServerReplication
-LicenseType <String>
-TargetResourceGroupId <String>
-TargetNetworkId <String>
-TargetSubnetName <String>
-TargetVMName <String>
-MachineId <String>
-DiskType <String>
-OSDiskID <String>
[-SqlServerLicenseType <String>]
[-LinuxLicenseType <String>]
[-TestNetworkId <String>]
[-TestSubnetName <String>]
[-VMWarerunasaccountID <String>]
[-TargetVMSize <String>]
[-PerformAutoResync <String>]
[-TargetAvailabilitySet <String>]
[-TargetAvailabilityZone <String>]
[-VMTag <IVMwareCbtEnableMigrationInputTargetVmtags>]
[-NicTag <IVMwareCbtEnableMigrationInputTargetNicTags>]
[-DiskTag <IVMwareCbtEnableMigrationInputTargetDiskTags>]
[-Tag <Hashtable>]
[-TargetBootDiagnosticsStorageAccount <String>]
[-DiskEncryptionSetID <String>]
[-SubscriptionId <String>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
ByIdPowerUser
New-AzMigrateServerReplication
-LicenseType <String>
-TargetResourceGroupId <String>
-TargetNetworkId <String>
-TargetSubnetName <String>
-TargetVMName <String>
-MachineId <String>
-DiskToInclude <IVMwareCbtDiskInput[]>
[-SqlServerLicenseType <String>]
[-LinuxLicenseType <String>]
[-TestNetworkId <String>]
[-TestSubnetName <String>]
[-VMWarerunasaccountID <String>]
[-TargetVMSize <String>]
[-PerformAutoResync <String>]
[-TargetAvailabilitySet <String>]
[-TargetAvailabilityZone <String>]
[-VMTag <IVMwareCbtEnableMigrationInputTargetVmtags>]
[-NicTag <IVMwareCbtEnableMigrationInputTargetNicTags>]
[-DiskTag <IVMwareCbtEnableMigrationInputTargetDiskTags>]
[-Tag <Hashtable>]
[-TargetBootDiagnosticsStorageAccount <String>]
[-SubscriptionId <String>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
New-AzMigrateServerReplication
-LicenseType <String>
-TargetResourceGroupId <String>
-TargetNetworkId <String>
-TargetSubnetName <String>
-TargetVMName <String>
-DiskType <String>
-OSDiskID <String>
-InputObject <IVMwareMachine>
[-SqlServerLicenseType <String>]
[-LinuxLicenseType <String>]
[-TestNetworkId <String>]
[-TestSubnetName <String>]
[-VMWarerunasaccountID <String>]
[-TargetVMSize <String>]
[-PerformAutoResync <String>]
[-TargetAvailabilitySet <String>]
[-TargetAvailabilityZone <String>]
[-VMTag <IVMwareCbtEnableMigrationInputTargetVmtags>]
[-NicTag <IVMwareCbtEnableMigrationInputTargetNicTags>]
[-DiskTag <IVMwareCbtEnableMigrationInputTargetDiskTags>]
[-Tag <Hashtable>]
[-TargetBootDiagnosticsStorageAccount <String>]
[-DiskEncryptionSetID <String>]
[-SubscriptionId <String>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
New-AzMigrateServerReplication
-LicenseType <String>
-TargetResourceGroupId <String>
-TargetNetworkId <String>
-TargetSubnetName <String>
-TargetVMName <String>
-DiskToInclude <IVMwareCbtDiskInput[]>
-InputObject <IVMwareMachine>
[-SqlServerLicenseType <String>]
[-LinuxLicenseType <String>]
[-TestNetworkId <String>]
[-TestSubnetName <String>]
[-VMWarerunasaccountID <String>]
[-TargetVMSize <String>]
[-PerformAutoResync <String>]
[-TargetAvailabilitySet <String>]
[-TargetAvailabilityZone <String>]
[-VMTag <IVMwareCbtEnableMigrationInputTargetVmtags>]
[-NicTag <IVMwareCbtEnableMigrationInputTargetNicTags>]
[-DiskTag <IVMwareCbtEnableMigrationInputTargetDiskTags>]
[-Tag <Hashtable>]
[-TargetBootDiagnosticsStorageAccount <String>]
[-SubscriptionId <String>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Description
The New-AzMigrateServerReplication cmdlet starts the replication for a particular discovered server in the Azure Migrate project.
Examples
Example 1: When there is only OS disk
New-AzMigrateServerReplication -MachineId "/subscriptions/xxx-xxx-xxx4/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.OffAzure/VMwareSites/AzMigratePWSHTc8d1site/machines/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_50063baa-9806-d6d6-7e09-c0ae87309b4f" -LicenseType NoLicenseType -TargetResourceGroupId "/subscriptions/xxx-xxx-xxx/resourceGroups/AzMigratePWSHtargetRG" -TargetNetworkId "/subscriptions/xxx-xxx-xxx/resourceGroups/AzMigratePWSHtargetRG/providers/Microsoft.Network/virtualNetworks/AzMigrateTargetNetwork" -TargetSubnetName default -TargetVMName "prsadhu-TestVM" -DiskType "Standard_LRS" -OSDiskID "6000C299-343d-7bcd-c05e-a94bd63316dd"
ActivityId : 68af14b4-46ae-48d1-b3e9-cdcffb9e8a93 ActivityId: 74d1a396-1d37-4264-8a5b-b727aaef0171
AllowedAction : {}
CustomDetailAffectedObjectDetail : Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.JobDetailsAffectedObjectDetails
CustomDetailInstanceType : AsrJobDetails
EndTime : 9/16/20 11:57:33 AM
Error : {}
FriendlyName : Enable
Id : /Subscriptions/xxx-xxx-xxx/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.Recover
yServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationJobs/997e2a92-5afe-49c7-a81a-89660aec9b7b
Location :
Name : 997e2a92-5afe-49c7-a81a-89660aec9b7b
ScenarioName : Enable
StartTime : 9/16/20 11:57:32 AM
State : Succeeded
StateDescription : Completed
TargetInstanceType : ProtectionProfile
TargetObjectId : 42752b89-5fad-52fd-bf93-679fbdb6fed9
TargetObjectName : migrateAzMigratePWSHTc8d1sitepolicy
Task : {CloudPairingPrerequisitesCheck, CloudPairingPrepareSite}
Type : Microsoft.RecoveryServices/vaults/replicationJobs
This is for the scenario, when there is only one single disk that has to be protected.
Example 2: When there are multiple disks
$OSDisk = New-AzMigrateDiskMapping -DiskID '6000C299-343d-7bcd-c05e-a94bd63316dd' -DiskType 'Standard_LRS' -IsOSDisk 'true'
$DataDisk = New-AzMigrateDiskMapping -DiskID '7000C299-343d-7bcd-c05e-a94bd63316dd' -DiskType 'Standard_LRS' -IsOSDisk 'false'
$DisksToInclude = @()
$DisksToInclude += $OSDisk
$DisksToInclude += $DataDisk
New-AzMigrateServerReplication -MachineId "/subscriptions/xxx-xxx-xxx/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.OffAzure/VMwareSites/AzMigratePWSHTc8d1site/machines/bcdr-vcenter-fareast-corp-micro-cfcc5a24-a40e-56b9-a6af-e206c9ca4f93_50063baa-9806-d6d6-7e09-c0ae87309b4f" -LicenseType NoLicenseType -TargetResourceGroupId "/subscriptions/xxx-xxx-xxx/resourceGroups/AzMigratePWSHtargetRG" -TargetNetworkId "/subscriptions/xxx-xxx-xxx/resourceGroups/AzMigratePWSHtargetRG/providers/Microsoft.Network/virtualNetworks/AzMigrateTargetNetwork" -TargetSubnetName default -TargetVMName "prsadhu-TestVM" -DiskToInclude $DisksToInclude -PerformAutoResync true
ActivityId : 68af14b4-46ae-48d1-b3e9-cdcffb9e8a93 ActivityId: 74d1a396-1d37-4264-8a5b-b727aaef0171
AllowedAction : {}
CustomDetailAffectedObjectDetail : Microsoft.Azure.PowerShell.Cmdlets.Migrate.Models.Api20180110.JobDetailsAffectedObjectDetails
CustomDetailInstanceType : AsrJobDetails
EndTime : 9/16/20 11:57:33 AM
Error : {}
FriendlyName : Enable
Id : /Subscriptions/xxx-xxx-xxx/resourceGroups/azmigratepwshtestasr13072020/providers/Microsoft.Recover
yServices/vaults/AzMigrateTestProjectPWSH02aarsvault/replicationJobs/997e2a92-5afe-49c7-a81a-89660aec9b7b
Location :
Name : 997e2a92-5afe-49c7-a81a-89660aec9b7b
ScenarioName : Enable
StartTime : 9/16/20 11:57:32 AM
State : Succeeded
StateDescription : Completed
TargetInstanceType : ProtectionProfile
TargetObjectId : 42752b89-5fad-52fd-bf93-679fbdb6fed9
TargetObjectName : migrateAzMigratePWSHTc8d1sitepolicy
Task : {CloudPairingPrerequisitesCheck, CloudPairingPrepareSite}
Type : Microsoft.RecoveryServices/vaults/replicationJobs
This is for the scenario, when there are multiple disks that has to be protected.
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: PSObject
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzureRMContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DiskEncryptionSetID
Specifies the disk encyption set to be used.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByIdDefaultUser
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ByInputObjectDefaultUser
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DiskTag
Specifies the tag to be used for disk creation.
To construct, see NOTES section for DISKTAG properties and create a hash table.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DiskToInclude
Specifies the disks on the source server to be included for replication.
To construct, see NOTES section for DISKTOINCLUDE properties and create a hash table.
Parameter properties
Parameter sets
ByIdPowerUser
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ByInputObjectPowerUser
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DiskType
Specifies the type of disks to be used for the Azure VM.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByIdDefaultUser
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ByInputObjectDefaultUser
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Specifies the discovered server to be migrated.
The server object can be retrieved using the Get-AzMigrateServer cmdlet.
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
Type: IVMwareMachine
Default value: None
Supports wildcards: False
DontShow: False
ByInputObjectDefaultUser
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ByInputObjectPowerUser
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-LicenseType
Specifies if Azure Hybrid benefit is applicable for the source server to be migrated.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-LinuxLicenseType
Specifies if Azure Hybrid benefit is applicable for the source linux server to be migrated.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-MachineId
Specifies the machine ID of the discovered server to be migrated.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByIdDefaultUser
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ByIdPowerUser
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-NicTag
Specifies the tag to be used for NIC creation.
To construct, see NOTES section for NICTAG properties and create a hash table.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-OSDiskID
Specifies the Operating System disk for the source server to be migrated.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByIdDefaultUser
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ByInputObjectDefaultUser
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Specifies if replication be auto-repaired in case change tracking is lost for the source server under replication.
Type: String
Default value: None
Supports wildcards: False
DontShow: False
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SqlServerLicenseType
Specifies if Azure Hybrid benefit for SQL Server is applicable for the server to be migrated.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SubscriptionId
Azure Subscription ID.
Parameter properties
Type: String
Default value: (Get-AzContext).Subscription.Id
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Tag
Specifies the tag to be used for Resource creation.
Parameter properties
Type: Hashtable
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-TargetAvailabilitySet
Specifies the Availability Set to be used for VM creationSpecifies the Availability Set to be used for VM creation.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-TargetAvailabilityZone
Specifies the Availability Zone to be used for VM creation.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-TargetBootDiagnosticsStorageAccount
Specifies the storage account to be used for boot diagnostics.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-TargetNetworkId
Specifies the Virtual Network id within the destination Azure subscription to which the server needs to be migrated.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-TargetResourceGroupId
Specifies the Resource Group id within the destination Azure subscription to which the server needs to be migrated.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-TargetSubnetName
Specifies the Subnet name within the destination Virtual Network to which the server needs to be migrated.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-TargetVMName
Specifies the name of the Azure VM to be created.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-TargetVMSize
Specifies the SKU of the Azure VM to be created.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-TestNetworkId
Specifies the Virtual Network id within the destination Azure subscription to which the server needs to be test migrated.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-TestSubnetName
Specifies the Subnet name within the destination Virtual Network to which the server needs to be test migrated.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-VMTag
Specifies the tag to be used for VM creation.
To construct, see NOTES section for VMTAG properties and create a hash table.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-VMWarerunasaccountID
Account id.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs