Compartilhar via


New-AzsDiskMigrationJob

Starts a managed disk migration job to migrate managed disks to the specified destination share.

Syntax

New-AzsDiskMigrationJob
   -Name <String>
   -TargetScaleUnit <String>
   -TargetVolumeLabel <String>
   -Disks \<IDisk[]>
   [-Location <String>]
   [-SubscriptionId <String>]
   [-DefaultProfile <PSObject>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]
New-AzsDiskMigrationJob
   -Name <String>
   -TargetShare <String>
   -Disks \<IDisk[]>
   [-Location <String>]
   [-SubscriptionId <String>]
   [-DefaultProfile <PSObject>]
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

Starts a managed disk migration job to migrate managed disks to the specified destination share.

Examples

-------------------------- EXAMPLE 1 --------------------------

$disks = Get-AzsDisk
PS C:\> New-AzsDiskMigrationJob -Name TestJob1 -TargetScaleUnit s-cluster -TargetVolumeLabel ObjStore_2 -Disks $disks

CreationTime : 2/26/2020 10:56:32 AM EndTime : Id : /subscriptions/627fecef-520e-4c18-94e0-8f0665ba86a7/providers/Microsoft.Compute.Admin/locations/redmond/diskmigrationjobs/TestJob1 Location : redmond MigrationId : TestJob1 Name : redmond/TestJob1 StartTime : Status : Pending Subtask : {53ee3665-00e4-4c69-a067-524058905ead, d551734f-0370-4851-9704-c7cec80b34c5} TargetShare : \SU1FileServer.s31r1801.masd.stbtest.microsoft.com\SU1_ObjStore_2 Type : Microsoft.Compute.Admin/locations/diskmigrationjobs

-------------------------- EXAMPLE 2 --------------------------

PS C:\> $disks = Get-AzsDisk
PS C:\> New-AzsDiskMigrationJob -Name TestJob2 -TargetShare \\SU1FileServer.s31r1801.masd.stbtest.microsoft.com\SU1_ObjStore_3 -Disks $disks
WARNING: TargetShare parameter will be deprecated in a future release, please use Volume instead.

CreationTime : 2/26/2020 11:02:48 AM EndTime : Id : /subscriptions/627fecef-520e-4c18-94e0-8f0665ba86a7/providers/Microsoft.Compute.Admin/locations/redmond/diskmigrati onjobs/TestJob2 Location : redmond MigrationId : TestJob2 Name : redmond/TestJob2 StartTime : Status : Pending Subtask : {0cfd8d29-1ca4-42db-a490-9198814abc50, 89c9b15e-47c6-4321-a390-611fc190cfad} TargetShare : \SU1FileServer.s31r1801.masd.stbtest.microsoft.com\SU1_ObjStore_3 Type : Microsoft.Compute.Admin/locations/diskmigrationjobs-AzsDiskMigrationJob -Name TestJob1 -TargetScaleUnit s-cluster -TargetVolumeLabel ObjStore_2 -Disks $disks

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:System.Management.Automation.SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:System.Management.Automation.PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Disks

. To construct, see NOTES section for DISKS properties and create a hash table.

Type:Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Models.Api20210401.IDisk[]
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Location

Location of the resource.

Type:System.String
Position:Named
Default value:(Get-AzLocation)[0].Location
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

The migration job guid name.

Type:System.String
Aliases:MigrationId
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SubscriptionId

Subscription credentials that uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

Type:System.String
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TargetScaleUnit

The target scale unit name.

Type:System.String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-TargetShare

The target share name.

Type:System.String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-TargetVolumeLabel

The target volume label.

Type:System.String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:System.Management.Automation.SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Models.Api20210401.IDisk[]

Outputs

Microsoft.Azure.PowerShell.Cmdlets.ComputeAdmin.Models.Api20210401.IDiskMigrationJob

Notes

ALIASES

Start-AzsDiskMigrationJob

COMPLEX PARAMETER PROPERTIES

To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables.

DISKS <IDisk[]>: .

  • [Location <String>]: Location of the resource.
  • [DiskId <String>]: The disk id.
  • [SharePath <String>]: The disk share path.
  • [Status <DiskState?>]: The disk status.