New-MgBetaCrossTenantMigrationJob

Create a new crossTenantMigrationJob. A job defines the migration batch but doesn't start validation or migration. After you create the job, call validate to verify tenant and resource configuration, then call migrate to begin the actual migration.

Syntax

CreateExpanded (Default)

New-MgBetaCrossTenantMigrationJob
    [-ResponseHeadersVariable <string>]
    [-AdditionalProperties <hashtable>]
    [-CompleteAfterDateTime <datetime>]
    [-CreatedBy <string>]
    [-CreatedDateTime <datetime>]
    [-DisplayName <string>]
    [-ExchangeSettings <IMicrosoftGraphExchangeOnlineCrossTenantMigrationSettings>]
    [-Id <string>]
    [-JobType <string>]
    [-LastUpdatedDateTime <datetime>]
    [-Message <string>]
    [-ResourceType <string>]
    [-Resources <string[]>]
    [-SourceTenantId <string>]
    [-Status <string>]
    [-TargetTenantId <string>]
    [-Users <IMicrosoftGraphCrossTenantMigrationTask[]>]
    [-Workloads <string[]>]
    [-Break]
    [-Headers <IDictionary>]
    [-HttpPipelineAppend <SendAsyncStep[]>]
    [-HttpPipelinePrepend <SendAsyncStep[]>]
    [-Proxy <uri>]
    [-ProxyCredential <pscredential>]
    [-ProxyUseDefaultCredentials]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Create

New-MgBetaCrossTenantMigrationJob
    -BodyParameter <IMicrosoftGraphCrossTenantMigrationJob>
    [-ResponseHeadersVariable <string>]
    [-Break]
    [-Headers <IDictionary>]
    [-HttpPipelineAppend <SendAsyncStep[]>]
    [-HttpPipelinePrepend <SendAsyncStep[]>]
    [-Proxy <uri>]
    [-ProxyCredential <pscredential>]
    [-ProxyUseDefaultCredentials]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Create a new crossTenantMigrationJob. A job defines the migration batch but doesn't start validation or migration. After you create the job, call validate to verify tenant and resource configuration, then call migrate to begin the actual migration.

Examples

Example 1: Code snippet


Import-Module Microsoft.Graph.Beta.Migrations

$params = @{
	displayName = "xtmigration_user_req_1"
	completeAfterDateTime = [System.DateTime]::Parse("2024-12-09T22:48:03.092Z")
	sourceTenantId = "12345678-1234-1234-1234-123456789012"
	exchangeSettings = @{
		targetDeliveryDomain = "xtmigration.onmicrosoft.com"
		sourceEndpoint = "sampleEndpointText"
	}
	resources = @(
	"4dd550d9-9ea2-4e71-a16b-60b1d1c4f506"
"63f15b55-f61a-49cb-a599-2e3d233afb2c"
"41d94bac-3a53-47d6-a89e-583830104e15"
)
resourceType = "Users"
workloads = @(
"Teams"
"Exchange"
"ODSP"
)
}

New-MgBetaCrossTenantMigrationJob -BodyParameter $params

This example shows how to use the New-MgBetaCrossTenantMigrationJob Cmdlet.

Parameters

-AdditionalProperties

Additional Parameters

Parameter properties

Type:System.Collections.Hashtable
Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-BodyParameter

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

Parameter properties

Type:Microsoft.Graph.Beta.PowerShell.Models.IMicrosoftGraphCrossTenantMigrationJob
Supports wildcards:False
DontShow:False

Parameter sets

Create
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Break

Wait for .NET debugger to attach

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
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

-CompleteAfterDateTime

Date and time after which the migration should be performed. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2024, is 2024-01-01T00:00:00Z.

Parameter properties

Type:System.DateTime
Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CreatedBy

User principal name (UPN) of the user who created the job. Read-only.

Parameter properties

Type:System.String
Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CreatedDateTime

When the job was created. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2024, is 2024-01-01T00:00:00Z. Read-only.

Parameter properties

Type:System.DateTime
Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DisplayName

Display name of the job. Must be unique per tenant.

Parameter properties

Type:System.String
Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ExchangeSettings

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

Parameter properties

Type:Microsoft.Graph.Beta.PowerShell.Models.IMicrosoftGraphExchangeOnlineCrossTenantMigrationSettings
Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Headers

Optional headers that will be added to the request.

Parameter properties

Type:System.Collections.IDictionary
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-HttpPipelineAppend

SendAsync Pipeline Steps to be appended to the front of the pipeline

Parameter properties

Type:

Microsoft.Graph.Beta.PowerShell.Runtime.SendAsyncStep[]

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

-HttpPipelinePrepend

SendAsync Pipeline Steps to be prepended to the front of the pipeline

Parameter properties

Type:

Microsoft.Graph.Beta.PowerShell.Runtime.SendAsyncStep[]

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

-Id

The unique identifier for an entity. Read-only.

Parameter properties

Type:System.String
Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-JobType

crossTenantMigrationJobType

Parameter properties

Type:System.String
Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LastUpdatedDateTime

When this migration job was last updated. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2024, is 2024-01-01T00:00:00Z. Read-only.

Parameter properties

Type:System.DateTime
Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Message

Status message of the migration job. Nullable. Read-only.

Parameter properties

Type:System.String
Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Proxy

The URI for the proxy server to use

Parameter properties

Type:System.Uri
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

-ProxyCredential

Credentials for a proxy server to use for the remote call

Parameter properties

Type:System.Management.Automation.PSCredential
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

-ProxyUseDefaultCredentials

Use the default credentials for the proxy

Parameter properties

Type:System.Management.Automation.SwitchParameter
Default value:False
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

-Resources

IDs (GUID) of the resources that are migrated with the migration job.

Parameter properties

Type:

System.String[]

Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceType

Type of resource being migrated. Only Users is currently supported.

Parameter properties

Type:System.String
Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResponseHeadersVariable

Optional Response Headers Variable.

Parameter properties

Type:System.String
Supports wildcards:False
DontShow:False
Aliases:RHV

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SourceTenantId

ID (GUID) of the tenant that content is migrated from.

Parameter properties

Type:System.String
Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Status

crossTenantMigrationJobStatus

Parameter properties

Type:System.String
Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-TargetTenantId

ID of the tenant that content is migrated to. Read-only.

Parameter properties

Type:System.String
Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Users

Details and status of the users migrated in this migration job. To construct, see NOTES section for USERS properties and create a hash table.

Parameter properties

Type:

Microsoft.Graph.Beta.PowerShell.Models.IMicrosoftGraphCrossTenantMigrationTask[]

Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Runs the command in a mode that only reports what would happen without performing the actions.

Parameter properties

Type:System.Management.Automation.SwitchParameter
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Workloads

Workloads to migrate. Supported workloads are Teams, Exchange, and ODSP (OneDrive/SharePoint).

Parameter properties

Type:

System.String[]

Supports wildcards:False
DontShow:False

Parameter sets

CreateExpanded
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.

Inputs

Microsoft.Graph.Beta.PowerShell.Models.IMicrosoftGraphCrossTenantMigrationJob

{{ Fill in the Description }}

System.Collections.IDictionary

{{ Fill in the Description }}

Outputs

Microsoft.Graph.Beta.PowerShell.Models.IMicrosoftGraphCrossTenantMigrationJob

{{ Fill in the Description }}

Notes

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.

BODYPARAMETER <IMicrosoftGraphCrossTenantMigrationJob>: crossTenantMigrationJob [(Any) <Object>]: This indicates any property can be added to this object. [Id <String>]: The unique identifier for an entity. Read-only. [CompleteAfterDateTime <DateTime?>]: Date and time after which the migration should be performed. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2024, is 2024-01-01T00:00:00Z. [CreatedBy <String>]: User principal name (UPN) of the user who created the job. Read-only. [CreatedDateTime <DateTime?>]: When the job was created. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2024, is 2024-01-01T00:00:00Z. Read-only. [DisplayName <String>]: Display name of the job. Must be unique per tenant. [ExchangeSettings <IMicrosoftGraphExchangeOnlineCrossTenantMigrationSettings>]: exchangeOnlineCrossTenantMigrationSettings [(Any) <Object>]: This indicates any property can be added to this object. [SourceEndpoint <String>]: Name of the Migration Endpoint in the source tenant [TargetDeliveryDomain <String>]: Delivery domain on the target tenant [JobType <String>]: crossTenantMigrationJobType [LastUpdatedDateTime <DateTime?>]: When this migration job was last updated. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2024, is 2024-01-01T00:00:00Z. Read-only. [Message <String>]: Status message of the migration job. Nullable. Read-only. [ResourceType <String>]: Type of resource being migrated. Only Users is currently supported. [Resources <String[]>]: IDs (GUID) of the resources that are migrated with the migration job. [SourceTenantId <String>]: ID (GUID) of the tenant that content is migrated from. [Status <String>]: crossTenantMigrationJobStatus [TargetTenantId <String>]: ID of the tenant that content is migrated to. Read-only. [Users <IMicrosoftGraphCrossTenantMigrationTask[]>]: Details and status of the users migrated in this migration job. [Id <String>]: The unique identifier for an entity. Read-only. [CurrentStatus <IMicrosoftGraphCrossTenantMigrationServiceStatusDetails[]>]: Most recent status of this migration task [Errors <IMicrosoftGraphError[]>]: Errors associated with the migration for this service [Code <String>]: The error code [Message <String>]: The message for the error [Message <String>]: Service status message [Service <String>]: Service or workload the status details are associated with [Status <String>]: crossTenantMigrationServiceStatus [LastUpdatedDateTime <DateTime?>]: Time the task was last updated [TaskType <String>]: Type of migration task. Only Users are supported at this time. [Workloads <String[]>]: Workloads to migrate. Supported workloads are Teams, Exchange, and ODSP (OneDrive/SharePoint).

EXCHANGESETTINGS <IMicrosoftGraphExchangeOnlineCrossTenantMigrationSettings>: exchangeOnlineCrossTenantMigrationSettings [(Any) <Object>]: This indicates any property can be added to this object. [SourceEndpoint <String>]: Name of the Migration Endpoint in the source tenant [TargetDeliveryDomain <String>]: Delivery domain on the target tenant

USERS <IMicrosoftGraphCrossTenantMigrationTask[]>: Details and status of the users migrated in this migration job. [Id <String>]: The unique identifier for an entity. Read-only. [CurrentStatus <IMicrosoftGraphCrossTenantMigrationServiceStatusDetails[]>]: Most recent status of this migration task [Errors <IMicrosoftGraphError[]>]: Errors associated with the migration for this service [Code <String>]: The error code [Message <String>]: The message for the error [Message <String>]: Service status message [Service <String>]: Service or workload the status details are associated with [Status <String>]: crossTenantMigrationServiceStatus [LastUpdatedDateTime <DateTime?>]: Time the task was last updated [TaskType <String>]: Type of migration task. Only Users are supported at this time.