I'm using AADSync 1.0.0494.0501.
I configured organizational unit based filtering in our AADSync implementation.
I'm trying to include additional OU-s to sync. I'm able to include the OU's using the GUI (Synchronization Service Manager), but now I have to do it programmatically.
Unfortunately, the AdSync Powershell module doesn't have any documentation (at least I didn't found it), and it seems other people are struggling with it, too.
http://www.integrationtrench.com/2015/04/using-powershell-with-aad-sync.html
I tried to add an OU to the connector using code similar to this:
$c = Get-ADSyncConnector -Name "my.domain.local" $c.Partitions[0].ConnectorPartitionScope.ContainerInclusionList.Add("OU=SyncUsers2,DC=my,DC=domain,DC=local") Update-ADSyncConnectorPartition -Connector $c
Any advice, how can I programmatically add a new OU to the AD connector?