Share via


ResumeUndoneImports.ps1

Applies To: Forefront Identity Manager 2010

# ResumeUndoneImports.ps1
# Copyright © 2010 Microsoft Corporation

# This script resumes incomplete imports once the specific error has been identified.

# It may be necessary to edit the first ImportObject in the undone imports file.
# Some changes include removing the object altogether or removing a particular attribute value.
$undone_filename = "undone.xml"

$undoneImports = ConvertTo-FIMResource -file $undone_filename
if($undoneImports -eq $null)
  {
    throw (new-object NullReferenceException -ArgumentList "Changes is null.  Check that the undone file has data.")
  }
Write-Host "Resuming import"
$newUndoneImports = $undoneImports | Import-FIMConfig

if($newUndoneImports -eq $null)
  {
    Write-Host "Import complete."
  }
else
  {
    Write-Host
    Write-Host "There were " $newUndoneImports.Count " uncompleted imports."
    $newUndoneImports | ConvertFrom-FIMResource -file $undone_filename
    Write-Host
    Write-Host "Please see the documentation on how to resolve the issues."
  }

See Also

Concepts

Configuration Migration Deployment Guide
Migration Scenarios
Configuration Migration Deployment Steps
Appendix A: Configuration Migration Windows PowerShell Scripts
CommitChanges.ps1
SyncPolicy.ps1
SyncSchema.ps1
ExportSchema.ps1
ExportPolicy.ps1
Appendix B: Annotated Configuration Migration Windows PowerShell Scripts
Appendix C: Troubleshooting FIM Configuration Migration