Friday 6 June 2008

Compare-Object gotcha

A while back I used Compare-Object to examine differences between two AD groups. Unsuccessfully. The results appeared to come back inconsistently with known matches showing incorrect, double-entries etc.

At that point I unfortunately ran out of time to look into it any further. However, I have just read a great post from Dimitry which probably explains why it happens.

Its to do with SyncWindow parameter - basically Powershell by default only looks at items + or - 5 elements away. You can use -
SyncWindow to extend this to what you need.

No comments: