New-CMMigrationJob

Creates a migration job in System Center Configuration Manager.

Syntax

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

Description

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

Examples

Example 1: Create a migration job

PS C:\> $CategoryObjects = Get-CMInitialModifiableSecuredCategory
PS C:\> $MigrationEntity = Get-CMMigrationEntity
PS C:\> New-CMMigrationJob -Name "123" -ObjectMigrationJobType -SecurityScope $CategoryObjects -MigrationObject $MigrationEntity

The first command uses the Get-CMInitialModifiableSecuredCategory cmdlet and stores the result in the $CategoryObjects variable.

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

The last command creates a migration job.

Required Parameters

-CollectionMigrationJobType

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

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

Indicates that you migrate associated objects with the collection.

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

Specifies an array of input objects.

Type:IResultObject[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MigrationObject

Specifies an array of input objects.

Type:IResultObject[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

Specifies the name of a migration job in Configuration Manager.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ObjectMigrationJobType

Indicates that the job type is an object migration job.

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

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

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

Specifies an array of security scope objects. To obtain a security scope object, use the Get-CMSecurityScope cmdlet. The cmdlet applies the security scopes that you specify to data migrated to the destination hierarchy.

Type:IResultObject[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-CollectionLimitingMapping

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

Type:Hashtable
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-ContentObjectsSiteCodeMapping

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

Type:Hashtable
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Description

Specifies a description for the migration job.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DisableWildcardHandling

DisableWildcardHandling treats wildcard characters as literal character values. Cannot be combined with ForceWildcardHandling.

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

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

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ForceWildcardHandling

ForceWildcardHandling processes wildcard characters and may lead to unexpected behavior (not recommended). Cannot be combined with DisableWildcardHandling.

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

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

Type:DateTime
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-OverwriteAllObject

Indicates whether to overwrite objects in the destination database.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SaveCollectionInfoPath

Specifies a path for the collection information.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SaveObjectInfoPath

Specifies a path for the object information.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SiteCodeReplacementMapping

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

Type:Hashtable
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-TransferOrganizationalFolderStructure

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

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-UtcTime

Indicates whether to use UTC time.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

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

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