Please provide a set of ADFIND/ADMOD commands to disable all the USER accounts in a specific OU and remove their group memberships leaving only Domain Users behind?
Posted on 2011-09-15
Greetings folks -
I have an OU that I use for separated employees. I'd like to use the ADFIND and ADMOD tools to find all the USER accounts in this OU and ensure they are all disabled. I'd also like to remove the group memberships of these same USER accounts leaving only Domain Users behind.
I'm seeking a set of commands to accomplish this task. I'd appreciate the help in the crafting them.
Only USER objects should be touched, no computer objects. The OU doesn't have any computer objects by default but your commands should ensure only USER objects are selected for safety reasons.
Thanks in advance for the help.