Skip to content

Instantly share code, notes, and snippets.

@KentNordstrom
Last active February 23, 2019 07:37
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save KentNordstrom/20013f355898dda16778d9c7623ff757 to your computer and use it in GitHub Desktop.
Script to Synchronize only the Sync Rules and no other object in the FIM Service MA Connector Space.
<#
.SYNOPSIS
Script to update only synchronization rules.
#>
Import-Module LithnetMiisAutomation
$MA = "FIMService"
$OldSyncRules = New-MVQuery -Attribute displayName -Operator IsPresent | Get-MVObject -ObjectType synchronizationRule
foreach($rule in $OldSyncRules)
{$void = Sync-CSObject (Get-CSObject -DN ($rule.CSMVLinks.ConnectorSpaceDN) -MA $MA) -Commit}
$NewSyncRules = Get-Disconnectors -MA $MA | ?{$_.ObjectType -eq 'SynchronizationRule'}
foreach($rule in $NewSyncRules)
{$void = Sync-CSObject (Get-CSObject -DN ($rule.DN) -MA $MA) -Commit}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment