New-CMMigrationJob

Creates a migration job in System Center Configuration Manager.

Syntax

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

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
Required:True
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
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MigrationCollection

Specifies an array of input objects.

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

Specifies an array of input objects.

Type:IResultObject[]
Required:True
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
Required:True
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
Required:True
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
Required:True
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[]
Required:True
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
Required:False
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
Required:False
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
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Description

Specifies a description for the migration job.

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

Indicates that wildcard handling is disabled.

Type:SwitchParameter
Required:False
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
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ForceWildcardHandling

Indicates that wildcard handling is enabled.

Type:SwitchParameter
Required:False
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
Required:False
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
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SaveCollectionInfoPath

Specifies a path for the collection information.

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

Specifies a path for the object information.

Type:String
Required:False
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
Required:False
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
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-UtcTime

Indicates whether to use UTC time.

Type:Boolean
Required:False
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
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False