Link to home
Create AccountLog in
Avatar of amaru96
amaru96

asked on

How can I get a list of all the OUs and sub-OU's in AD

Hi guys, how can I get a list of all the OUs and sub-OU's in AD and be able to get that information into excel?

Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Mike Kline
Mike Kline
Flag of United States of America image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of amaru96
amaru96

ASKER

Hi, that works pretty well, I particularly like the first dump "adfind -sc oudmp", however it brings back a result for all the OU's across ALL the domains. Is there a way to specifiy which domain to search in?
Suppose your domain was    domain.com

adfind -b "dc=domain,dc=com" -sc oudmp

thanks

Mike
Avatar of amaru96

ASKER

Thanks a lot.