Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

CommitChanges.ps1

Updated: August 10, 2010

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

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.