API Reference
Command
New-ADXMigrationComputer
Creates a typed computer item for an AD migration plan.
Examples
Example 1: Add a workstation to a complete plan, then review domain-join and SIDHistory phases.
$plan = New-ADXMigrationPlan -SourceDomain old.contoso.com -DestinationDomain new.contoso.com -SourceDomainController old-pdc.old.contoso.com -DestinationDomainController new-dc01.new.contoso.com -DestinationOrganizationalUnit 'OU=Workstations,DC=new,DC=contoso,DC=com' -SourceAuditReady -SourceTcpipClientSupportReady -ResourceAclScanCompleted -BusinessJustification CAB-1234 {
New-ADXMigrationComputer -SourceSamAccountName 'PC001$' -DestinationSamAccountName 'PC001$' -OfflineDomainJoin
}
$checked = $plan | Test-ADXMigrationPlan -PassThru
$checked.Phases | Where-Object { $_.Kind -in 'PrepareDestination','SidHistory','ComputerJoin','Validate' } | Format-Table Kind, Item, RequiresMachineExecutor, Description -AutoSize
Example 2: Plan a workstation migration that requires machine-side join and local profile migration.
$plan = New-ADXMigrationPlan -SourceDomain old.contoso.com -DestinationDomain new.contoso.com -DestinationOrganizationalUnit 'OU=Workstations,DC=new,DC=contoso,DC=com' -SourceAuditReady -SourceTcpipClientSupportReady -ResourceAclScanCompleted -BusinessJustification CAB-1234 {
New-ADXMigrationComputer -SourceSamAccountName 'PC002$' -OfflineDomainJoin -MigrateProfile -RequireMachineSideExecutor
}
$plan | Test-ADXMigrationPlan -PassThru |
Select-Object -ExpandProperty Phases |
Where-Object { $_.RequiresMachineExecutor -or $_.Kind -in 'ComputerJoin','Profile' } |
Format-Table Kind, Item, RequiresMachineExecutor, Description -AutoSize
Example 3: Track a server whose destination computer object already exists and preview the remaining phases.
$plan = New-ADXMigrationPlan -SourceDomain old.contoso.com -DestinationDomain new.contoso.com -DestinationOrganizationalUnit 'OU=Servers,DC=new,DC=contoso,DC=com' -ResourceAclScanCompleted -BusinessJustification CAB-1234 {
New-ADXMigrationComputer -SourceSamAccountName 'SRV-FS01$' -SkipDestinationPreparation -NoSidHistory -RequireMachineSideExecutor
New-ADXMigrationResource -Path '\\SRV-FS01\Data' -ReAclMode AddDestinationBeforeRemoveSource
}
if ($plan | Test-ADXMigrationPlan) {
$plan | Invoke-ADXMigrationPlan
}
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
New-ADXMigrationComputer -SourceSamAccountName <string> [-AllowPrivilegedSidHistory] [-Attribute <Hashtable>] [-CommonName <string>] [-CopyAttribute <string[]>] [-CredentialProviderName <string>] [-CredentialSecretReference <string>] [-CredentialStrategy <ResetRandom|SetTemporary|SetKnown|ExternalSyncProvider|Manual>] [-Description <string>] [-DestinationOrganizationalUnit <string>] [-DestinationSamAccountName <string>] [-DnsHostName <string>] [-MigrateProfile] [-NoSidHistory] [-OfflineDomainJoin] [-RequireMachineSideExecutor] [-SkipDestinationPreparation] [<CommonParameters>]#Parameters
- SourceSamAccountName string
- Source computer SAM account name.
- AllowPrivilegedSidHistory SwitchParameter
- Allows privileged SIDHistory when explicitly approved.
- Attribute Hashtable
- Explicit destination attributes to set during preparation.
- CommonName string
- Optional destination common name.
- CopyAttribute string[]
- Attribute names to copy from source to destination.
- CredentialProviderName string
- External credential sync provider name.
- CredentialSecretReference string
- Secret reference for supplied-password strategies. Do not pass cleartext passwords.
- CredentialStrategy AdMigrationCredentialStrategy
- Credential handling strategy. Possible values: None, ResetRandom, SetTemporary, SetKnown, ExternalSyncProvider, Manual
- Possible values:
ResetRandom,SetTemporary,SetKnown,ExternalSyncProvider,Manual - Description string
- Optional destination description.
- DestinationOrganizationalUnit string
- Destination organizational unit distinguished name.
- DestinationSamAccountName string
- Destination computer SAM account name. Defaults to the source SAM account name.
- DnsHostName string
- Optional destination DNS host name.
- MigrateProfile SwitchParameter
- Requests workstation profile migration after domain transition.
- NoSidHistory SwitchParameter
- Disables SIDHistory continuity for this item.
- OfflineDomainJoin SwitchParameter
- Uses offline domain join material where supported.
- RequireMachineSideExecutor SwitchParameter
- Requires a machine-side executor for join/profile operations.
- SkipDestinationPreparation SwitchParameter
- Skips destination object pre-staging.
Outputs
ADPlayground.Migrations.Core.AdMigrationPrincipalItem