FIM ScriptBox Item

Summary

The script initiates the internal synchronization of the synchronization configuration data.

Script Code

001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
#-------------------------------------------------------------------------------------------------
 $lstMA = @(get-wmiobject -Class "MIIS_ManagementAgent" `
             -Namespace "root\MicrosoftIdentityIntegrationServer" `
      -Filter "Type='Forefront Identity Management (FIM)'" `
      -Computername ".") 
 If($lstMA.count -eq 0) {throw "There is no FIM management agent configured!"} 
 
 Write-Host "`nSynchronization in progress - please wait" 
 ($lstMA[0].ResyncSyncConfigObjects()).ReturnValue
#-------------------------------------------------------------------------------------------------
 trap 
 {
  Write-Host "`nError: $($_.Exception.Message)`n" -foregroundcolor white -backgroundcolor darkred  
  Exit
 trap 
 {
  Write-Host "`nError: $($_.Exception.Message)`n" -foregroundcolor white -backgroundcolor darkred&nan> 1
 }
#-------------------------------------------------------------------------------------------------

 

note Note
To provide feedback about this script, create a post on the FIM TechNet Forum.
For more FIM related Windows PowerShell scripts, see the FIM ScriptBox.