Clear-CMMigrationData

Deletes historical data about a data migration operation.

Syntax

Clear-CMMigrationData
     [-Force]
     -SourceSiteCode <String>
     [-DisableWildcardHandling]
     [-ForceWildcardHandling]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]

Description

The Clear-CMMigrationData cmdlet deletes the historical data about a data migration operation. With Configuration Manager, you can migrate data from a supported Configuration Manager hierarchy to a Configuration Manager environment. When you migrate data from a source hierarchy, you access data from the site databases that you identify in the source infrastructure and then transfer that data to your current environment from the database of the destination hierarchy. Clear-CMMigrationData cleans up the historical data from the destination hierarchy database.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Examples

Example 1: Clean up historical data from a migration

PS XYZ:\>Clear-CMMigrationData -SiteCode "C04"

This command removes the historical data from the destination site that has the site code C04.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

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

-DisableWildcardHandling

This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.

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

-Force

Forces the command to run without asking for user confirmation.

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

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

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

-SourceSiteCode

Type:String
Aliases:SiteCode
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 doesn't run.

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

Inputs

None

Outputs

System.Object