API Reference
Command
Export-ADXMigrationPlan
Exports an AD migration plan to a repeatable JSON artifact.
Examples
Example 1: Export a reviewed migration plan for approval and later execution.
$plan = New-ADXMigrationPlan -SourceDomain old.contoso.com -DestinationDomain new.contoso.com -DestinationOrganizationalUnit 'OU=Migrated,DC=new,DC=contoso,DC=com' -SourceAuditReady -SourceTcpipClientSupportReady -ResourceAclScanCompleted -BusinessJustification CAB-1234 {
New-ADXMigrationUser -SourceSamAccountName alice -CredentialStrategy ResetRandom -MigrateMembership
New-ADXMigrationResource -Path '\\FS1\Finance' -ReAclMode AddDestinationBeforeRemoveSource
}
$plan | Test-ADXMigrationPlan -PassThru | Export-ADXMigrationPlan -Path '.\CAB-1234.adxmigration.json' -Force
Example 2: Round-trip an exported plan before apply.
$plan | Export-ADXMigrationPlan -Path '.\CAB-1234.adxmigration.json' -Force
$imported = Import-ADXMigrationPlan -Path '.\CAB-1234.adxmigration.json'
$imported | Test-ADXMigrationPlan -PassThru | Select-Object -ExpandProperty Phases | Format-Table Kind, Item, Description -AutoSize
Common Parameters
This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.
For more information, see about_CommonParameters.
Syntax
Export-ADXMigrationPlan -Path <string> -Plan <AdMigrationPlan> [-Force] [-PassThru] [<CommonParameters>]#Parameters
- Path string
- Destination JSON file path.
- Plan AdMigrationPlan
- Migration plan to export.
- Force SwitchParameter
- Overwrites an existing export file.
- PassThru SwitchParameter
- Returns the exported file after writing.
Outputs
System.IO.FileInfo