Command needed to get cn; displayName; & manager attributes?

Hello all,

I’m a beginner in Power Shell and am having trouble creating a command/script that will return cn; displayName; & manager attributes from AD Objects within a certain OU.

For example I have four different OU’s that each have multiple and different object types in them. OU 1 has users, OU 2 has security groups and global security groups etc… and so on.

Can someone provide an example of how this script should be created. I can’t seem to figure out how to return all the needed information for each object within a specific OU/folder. Each OU has about 100 users and/or security groups in it. Thanks in advance.


What have you tried so far? Please show your code. You may start with reading the help for Get-ADUser. Please read the help completely including the examples to learn how to use it.

Thanks Olaf, that document helped a ton. I figured it out, I wasn’t putting the OU in correctly. I then added -properties, cn, displayName, manager and exported it and it all came out perfect.

Great. I’m proud of you and I’m glad I was of help.

Have a great day. :wink: