I am working on a project where we grab all useful user data from the AD/all OUs. We are doing this in order to move a user if they are in the wrong OU. For this we want to ignore all sub-OU in every OU, we also want to do this with out hard coding in a bunch of -nolike statements as we have many sub-OU. From my time researching this it looks like the only way to do this is through hard coding. Is there a way of, when searching through AD, ignoring ALL sub-ou and just searching all OU.
Thanks for any help,