FIM 2010 provides CMDlets to migrate the configuration of the FIM Portal from one server to another. The first step is exporting the configuration of the SOURCE server. The Powershell script you can use for that is:

---------

# ExportPilot.ps1

# Copyright (c) 2009 Microsoft Corporation

# The purpose of this script is to export the current configuration in the pilot environment.

# The script stores the configuration into file "pilot.xml" in the current directory.

Add-PSSnapin FIMAutomation

$pilot_filename = "pilot.xml"

Write-Host "Exporting configuration objects from pilot."

$pilot = Export-FIMConfig -uri http://localhost:5725/ResourceManagementService -policyConfig -schemaConfig -portalConfig

Write-Host "Exported " $pilot.Count " objects from pilot."

$pilot | ConvertFrom-FIMResource -file $pilot_filename

Write-Host "Pilot file is saved as " $pilot_filename "."

Write-Host "Export complete. The next step is to copy " $pilot_filename " to production and run SyncProduction.ps1."

---------

 

This script will export policy configuration, schema configuration and portal configuration. If you want to export custom configuration such certain object types you need to replace a line as specified in the documentation.

REPLACE

$pilot = Export-FIMConfig -uri http://localhost:5725/ResourceManagementService -policyConfig -schemaConfig -portalConfig

WITH

$pilot = Export-FIMConfig -uri http://localhost:5725/ResourceManagementService -policyConfig -schemaConfig -portalConfig -customConfig ("Group","Person")

 

However as soon as you execute your adjusted powershell script, you will get the following error:

-------------

Export-FIMConfig : Failure on making enumeration web service call.

Filter = Group

Error= Microsoft.ResourceManagement.WebServices.Faults.ServiceFaultException: c

annot filter as requested

at Microsoft.ResourceManagement.WebServices.Client.ResourceTemplate.Enumerat

eResources(SearchParameters parameters)

at Microsoft.ResourceManagement.WebServices.ResourceManager.MoveNext()

at Microsoft.ResourceManagement.Automation.ExportConfig.EndProcessing()

At C:\_FIM-CONFIG\ExportFIMConfigFromSource.ps1:10 char:27

+ $Source = Export-FIMConfig <<<< -uri http://localhost:5725/ResourceManagemen

tService -policyConfig -schemaConfig -portalConfig -customConfig ("Group","Pers

on")

+ CategoryInfo : InvalidOperation: (:) [Export-FIMConfig], Invali

dOperationException

+ FullyQualifiedErrorId : ExportConfig,Microsoft.ResourceManagement.Automa

tion.ExportConfig

-------------

 

This is telling you the filter of the customConfig option is wrong. That is weird as the way I'm using is also mentioned in the help of the CMDlet. However, it appears that you need to use the XPATH filter notation. So the correct line would be:

$pilot = Export-FIMConfig -uri http://localhost:5725/ResourceManagementService -policyConfig -schemaConfig -portalConfig -customConfig ("/Group","/Person")

 

Oh, by the way… This is for FIM 2010 RC 1 Update2

 

SOURCE: http://social.technet.microsoft.com/Forums/en-US/ilm2/thread/6e543d7a-2543-4975-9b5d-0615ae341e47

 

Cheers,

Jorge

--------------------------------------------------------------------------------------------------
* This posting is provided "AS IS" with no warranties and confers no rights!
* Always test before implementing!
--------------------------------------------------------------------------------------------------
############### Jorge's Quest For Knowledge ###############
######## http://blogs.dirteam.com/blogs/jorge/default.aspx #########
--------------------------------------------------------------------------------------------------