This project is read-only.

###
### Create a Sync Rule: OSR Contoso User
###
$newSRParameters = @{
DisplayName 		      = 'OSR Contoso User'
Description 		      = 'Outbound Sync Rule to Contoso AD: Users'
ManagementAgentID 	      = ('ma-data','DisplayName','Contoso')
ConnectedObjectType 	      = 'user'
ILMObjectType 		      = 'person'
DisconnectConnectedSystemObject = 'True'	
CreateConnectedSystemObject     = 'True'
CreateILMObject 	      = 'False'	
FlowType 		      = '1'
Precedence 		      = '1'        
RelationshipCriteria       = '<conditions><condition><ilmAttribute>accountName</ilmAttribute><csAttribute>sAMAccountName</csAttribute></condition></conditions>'
msidmOutboundIsFilterBased      = 'True'
msidmOutboundScopingFilters     = '<scoping><scope><csAttribute>employeeStatus</csAttribute><csOperator>EQUAL</csOperator><csValue>Active</csValue></scope></scoping>'
InitialFlow 	= @(
'<export-flow allows-null="false"><src></src><dest>unicodePwd</dest><scoping></scoping><fn id="+" isCustomExpression="true"><arg>"H00f"</arg><arg><fn id="RandomNum" isCustomExpression="false"><arg>1111</arg><arg>9999</arg></fn></arg><arg>"HeaRt3d"</arg><arg><fn id="RandomNum" isCustomExpression="false"><arg>1111</arg><arg>9999</arg></fn></arg></fn></export-flow>'
'<export-flow allows-null="false"><src>514</src><dest>userAccountControl</dest><scoping></scoping></export-flow>'
'<export-flow allows-null="false"><src><attr>accountName</attr></src><dest>dn</dest><scoping></scoping><fn id="+" isCustomExpression="true"><arg><fn id="EscapeDNComponent" isCustomExpression="false"><arg><fn id="+" isCustomExpression="false"><arg>"CN="</arg><arg>accountName</arg></fn></arg></fn></arg><arg>",OU=Users,DC=cmmContoso,DC=extest,DC=microsoft,DC=com"</arg></fn></export-flow>' 		
	)
	PersistentFlow 	= @(
'<export-flow allows-null="false"><src><attr>accountName</attr></src><dest>sAMAccountName</dest><scoping></scoping></export-flow>'
'<export-flow allows-null="false"><src><attr>company</attr></src><dest>company</dest><scoping></scoping><fn id="Trim" isCustomExpression="false"><arg>company</arg></fn></export-flow>'
'<export-flow allows-null="false"><src><attr>displayName</attr></src><dest>displayName</dest><scoping></scoping><fn id="Trim" isCustomExpression="false"><arg>displayName</arg></fn></export-flow>'
'<export-flow allows-null="false"><src><attr>email</attr></src><dest>mail</dest><scoping></scoping><fn id="Trim" isCustomExpression="false"><arg>email</arg></fn></export-flow>'
'<export-flow allows-null="false"><src><attr>firstName</attr></src><dest>givenName</dest><scoping></scoping><fn id="Trim" isCustomExpression="false"><arg>firstName</arg></fn></export-flow>'
'<export-flow allows-null="false"><src><attr>lastName</attr></src><dest>sn</dest><scoping></scoping><fn id="Trim" isCustomExpression="false"><arg>lastName</arg></fn></export-flow>'		
'<export-flow allows-null="false"><src><attr>manager</attr></src><dest>manager</dest><scoping></scoping></export-flow>'
 	)
}
New-FimSynchronizationRule @newSRParameters

Last edited Aug 14, 2012 at 7:56 PM by CraigMartin, version 1

Comments

SylvainC Jul 8, 2013 at 3:24 PM 
Some changes are needed regarding the version 2.1 :
- DisconnectConnectedSystemObject, CreateConnectedSystemObject, CreateILMObject and msidmOutboundIsFilterBased require a boolean value ($true or $false)
- RelationshipCriteria requires a hastable ( @{'accountName'='sAMAccountName'} )