Share via


CommitChanges.ps1

Applies To: Forefront Identity Manager 2010

# CommitChanges.ps1
# Copyright © 2009 Microsoft Corporation

# This script applies the changes necessary to migrate configuration.

$changes_filename = "changes.xml"
$undone_filename = "undone.xml"

$imports = ConvertTo-FIMResource -file $changes_filename
if($imports -eq $null)
  {
    throw (new-object NullReferenceException -ArgumentList "Changes is null.  Check that the changes file has data.")
  }
Write-Host "Importing changes into production."
$undoneImports = $imports | Import-FIMConfig
if($undoneImports -eq $null)
  {
    Write-Host "Import complete."
  }
else
  {
    Write-Host
    Write-Host "There were " $undoneImports.Count " uncompleted imports."
    $undoneImports | 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
ResumeUndoneImports.ps1
SyncPolicy.ps1
SyncSchema.ps1
ExportSchema.ps1
ExportPolicy.ps1
Appendix B: Annotated Configuration Migration Windows PowerShell Scripts
Appendix C: Troubleshooting FIM Configuration Migration