New-CMMigrationJob

New-CMMigrationJob

Creates a migration job in System Center 2012 Configuration Manager.

Syntax

Parameter Set: NewMigrationJobByCollectionMigrateObject
New-CMMigrationJob -CollectionMigrationJobType -MigrateObjectWithSpecifiedCollection -MigrationCollection <IResultObject[]> -MigrationObject <IResultObject[]> -Name <String> -SecurityScope <IResultObject[]> [-CollectionLimitingMapping <Hashtable> ] [-ContentObjectsSiteCodeMapping <Hashtable> ] [-Description <String> ] [-EnableProgramAfterAdvertisementMigrated <Boolean> ] [-MigrationJobSchedule <DateTime> ] [-OverwriteAllObject <Boolean> ] [-SaveCollectionInfoPath <String> ] [-SaveObjectInfoPath <String> ] [-SiteCodeReplacementMapping <Hashtable> ] [-TransferOrganizationalFolderStructure <Boolean> ] [-UtcTime <Boolean> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: NewMigrationJobByCollectionNotMigrateObject
New-CMMigrationJob -CollectionMigrationJobType -MigrationCollection <IResultObject[]> -Name <String> -SecurityScope <IResultObject[]> [-CollectionLimitingMapping <Hashtable> ] [-Description <String> ] [-EnableProgramAfterAdvertisementMigrated <Boolean> ] [-MigrationJobSchedule <DateTime> ] [-OverwriteAllObject <Boolean> ] [-SaveCollectionInfoPath <String> ] [-SaveObjectInfoPath <String> ] [-SiteCodeReplacementMapping <Hashtable> ] [-TransferOrganizationalFolderStructure <Boolean> ] [-UtcTime <Boolean> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: NewMigrationJobByObject
New-CMMigrationJob -MigrationObject <IResultObject[]> -Name <String> -ObjectMigrationJobType -SecurityScope <IResultObject[]> [-ContentObjectsSiteCodeMapping <Hashtable> ] [-Description <String> ] [-MigrationJobSchedule <DateTime> ] [-OverwriteAllObject <Boolean> ] [-SaveObjectInfoPath <String> ] [-SiteCodeReplacementMapping <Hashtable> ] [-TransferOrganizationalFolderStructure <Boolean> ] [-UtcTime <Boolean> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: NewMigrationJobByObjectModified
New-CMMigrationJob -MigrationObject <IResultObject[]> -Name <String> -ObjectModifiedAfterMigrationJobType -SecurityScope <IResultObject[]> [-ContentObjectsSiteCodeMapping <Hashtable> ] [-Description <String> ] [-MigrationJobSchedule <DateTime> ] [-OverwriteAllObject <Boolean> ] [-SaveObjectInfoPath <String> ] [-SiteCodeReplacementMapping <Hashtable> ] [-TransferOrganizationalFolderStructure <Boolean> ] [-UtcTime <Boolean> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The New-CMMigrationJob cmdlet creates a migration job in Microsoft System Center 2012 Configuration Manager.

Parameters

-CollectionLimitingMapping<Hashtable>

Specifies key-value pairings to limit a collection. Collection limiting prevents the addition of collection members you do want in the collection.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-CollectionMigrationJobType

Indicates whether the job migrates collections, objects, or previously migrated objects.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ContentObjectsSiteCodeMapping<Hashtable>

Specifies key-value pairs that map content objects in the new site.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Description<String>

Specifies a description for the migration job.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-EnableProgramAfterAdvertisementMigrated<Boolean>

Indicates whether to enable programs associated with an advertisement after they have migrated.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-MigrateObjectWithSpecifiedCollection

Indicates that you migrate associated objects with the collection.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-MigrationCollection<IResultObject[]>

Specifies an array of input objects.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-MigrationJobSchedule<DateTime>

Specifies a date time, in D.HH:MM:SS format, to schedule the migration job.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-MigrationObject<IResultObject[]>

Specifies an array of input objects.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of a migration job in Configuration Manager.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ObjectMigrationJobType

Indicates that the job type is an object migration job.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ObjectModifiedAfterMigrationJobType

Indicates that the new migration job only includes objects that were modified since the last migration.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-OverwriteAllObject<Boolean>

Indicates whether to overwrite objects in the destination database.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SaveCollectionInfoPath<String>

Specifies a path for the collection information.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SaveObjectInfoPath<String>

Specifies a path for the object information.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SecurityScope<IResultObject[]>

Specifies an array of security scopes to apply to data migrated to the destination hierarchy.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SiteCodeReplacementMapping<Hashtable>

Specifies key-value pairs that map a migrated collection to a site in the destination.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-TransferOrganizationalFolderStructure<Boolean>

Indicates whether to migrate an empty collection. Configuration Manager converts the empty collection to an organizational folder.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-UtcTime<Boolean>

Indicates whether to use UTC time.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

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

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Create a migration job

This example creates a migration job.

The first command creates mappings of site codes and stores the result in the $Group variable.

The second command uses the Get-CMInitModifiableSecuredCategory cmdlet and stores the result in the $CategoryObjects variable.

The third command uses the Get-CMMigrationEntity cmdlet and stores the result in the $MigrationEntity variable.

The fourth command uses the New-CMMigrationJob cmdlet to create a migration job.

PS C:\> $Group = @{
"122" = "123"
"234" = "123"
}
PS C:\> $CategoryObjects = Get-CMInitModifiableSecuredCategory
PS C:\> $MigrationEntity = Get-CMMigrationEntity
PS C:\> New-CMMigrationJob -Name "123" -ObjectMigrationJobType -ContentObjectsSiteCodeMapping $Group -SecurityScope $CategoryObjects -MigrationObject $MigrationEntity

Get-CMInitModifiableSecuredCategory

Get-CMMigrationEntity