I was working with a customer that asked if there was a way to export from ADConnect the OU filtering settings. From PowerShell on the server where ADConnect is installed I was able to run the following:
1 2 3 4 5 6 7 8 9 10 11 12 |
$ExcludeFilterFileName = "c:\Export\ExcludeFilter.txt" $IncludeFilterFileName = "c:\Export\IncludeFilter.txt" New-Item -Path 'C:\Export' -ItemType Directory -ErrorAction SilentlyContinue $ADConnectorName = "domain.local" $ADConnector = Get-ADSyncConnector -Name $ADConnectorName # Assumes that only one partition exist on the connector $ADConPartition = Get-ADSyncConnectorPartition -Connector $ADConnector[0] -Identifier $ADConnector.Partitions.Identifier.Guid $ADConPartition.ConnectorPartitionScope.ContainerInclusionList | Out-File -FilePath $IncludeFilterFileName $ADConPartition.ConnectorPartitionScope.ContainerExclusionList | Out-File -FilePath $ExcludeFilterFileName |
You will need to change the name of the AD domain on the 4th line and the exported text files will be saved to the C:\Export folder.