API Reference
Command
Invoke-ADXSidHistoryRecovery
Executes governed SIDHistory recovery from captured cleanup evidence.
Examples
Example 1: Recover a removed SIDHistory value only after cleanup evidence shows replacement access failed.
$cleanup = Get-ADXSidHistoryCleanupPlan -Domain new.contoso.com -SamAccountName alice -SidHistoryToRemove S-1-5-21-1-2-3-1101 -ResourceAclScanCompleted -ReplacementAccessValidated -RecoveryEvidenceCaptured -TrustCleanupPlanned -ProxyCleanupReviewed -ChangeReason CAB-1234
$cleanup.Items | Format-Table Principal, SidHistoryValue, CanRemove, RecoveryEvidenceRequired, Message -AutoSize
Invoke-ADXSidHistoryRecovery -SourceDomain old.contoso.com -SourceSamAccountName alice -DestinationDomain new.contoso.com -DestinationSamAccountName alice -RemovedSidHistory S-1-5-21-1-2-3-1101 -ReplacementAccessFailed -RecoveryReason 'Replacement access failed after cleanup' -SourceAuditReady -SourceTcpipClientSupportReady -ResourceAclScanCompleted -Intent read_write -AllowWrite -Apply -WriteExecutionId exec-2 -WriteActorId admin -WriteChangeReason INC-9 -WriteRollbackPlanId rollback-2
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
Invoke-ADXSidHistoryRecovery -DestinationDomain <string> -DestinationSamAccountName <string> -RemovedSidHistory <string> -SourceDomain <string> -SourceSamAccountName <string> [-AllowPrivilegedSidHistory] [-AllowWrite] [-Apply] [-BusinessJustification <string>] [-CleanupExecutionId <string>] [-DestinationCredential <PSCredential>] [-DestinationDomainController <string>] [-DryRun <bool>] [-Intent <string>] [-RecoveryReason <string>] [-RemovedAtUtc <DateTimeOffset>] [-ReplacementAccessFailed] [-ResourceAclDependencyCount <int>] [-ResourceAclScanCompleted] [-SourceAuditReady] [-SourceCredential <PSCredential>] [-SourceDomainController <string>] [-SourceTcpipClientSupportReady] [-WriteActorId <string>] [-WriteAuditCorrelationId <string>] [-WriteChangeReason <string>] [-WriteExecutionId <string>] [-WriteRollbackPlanId <string>] [-WriteRollbackProviderId <string>] [<CommonParameters>]#Parameters
- DestinationDomain string
- Destination DNS domain name.
- DestinationSamAccountName string
- Destination domain-relative SAM account name.
- RemovedSidHistory string
- Removed SIDHistory value to recover.
- SourceDomain string
- Source DNS domain name.
- SourceSamAccountName string
- Source domain-relative SAM account name.
- AllowPrivilegedSidHistory SwitchParameter
- Allows migration of privileged source SIDs when explicitly approved.
- AllowWrite SwitchParameter
- Explicit write confirmation flag for mutating operations.
- Apply SwitchParameter
- Applies changes. Without this switch, the cmdlet runs in dry-run mode.
- BusinessJustification string
- Business justification or change ticket.
- CleanupExecutionId string
- Cleanup execution identifier that removed the value.
- DestinationCredential PSCredential
- Optional destination-domain credential.
- DestinationDomainController string
- Destination domain controller.
- DryRun bool
- Dry-run mode flag. Defaults to true; set to false and use -Apply to execute writes.
- Intent string
- Execution intent (read_only or read_write). Default: read_only.
- RecoveryReason string
- Reason for recovery.
- RemovedAtUtc DateTimeOffset
- Time the SIDHistory value was removed.
- ReplacementAccessFailed SwitchParameter
- Confirms that replacement access failed and recovery is justified.
- ResourceAclDependencyCount int
- Number of resource ACL dependencies still relying on the source SID.
- ResourceAclScanCompleted SwitchParameter
- Confirms that resource ACL dependency discovery was completed.
- SourceAuditReady SwitchParameter
- Confirms that source audit prerequisites are ready.
- SourceCredential PSCredential
- Optional source-domain administrator credential.
- SourceDomainController string
- Source PDC emulator or source domain controller.
- SourceTcpipClientSupportReady SwitchParameter
- Confirms that source TcpipClientSupport is ready.
- WriteActorId string
- Write actor identifier.
- WriteAuditCorrelationId string
- Optional write audit correlation identifier.
- WriteChangeReason string
- Write change reason, ticket, or approval reference.
- WriteExecutionId string
- Write execution identifier for governance/audit correlation.
- WriteRollbackPlanId string
- Write rollback plan identifier.
- WriteRollbackProviderId string
- Optional write rollback provider identifier.
Outputs
ADPlayground.Migrations.SidHistory.SidHistoryRecoveryExecutionResult