managedby for a single user

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
mseiler
Posts: 1
Joined: 11 Aug 2011 08:13

managedby for a single user

#1 Post by mseiler » 11 Aug 2011 08:21

Hello,

I've got a very simple question but I don't get it on my own:-(

I just want to get the "Manager" from a single group. I have found the code for every group if there is a known manager:

Code: Select all

dsquery * -filter "(&(objectClass=group)(managedBy=*))" -attr samaccountname managedby -limit 0 

pause


But how can I change the code that I get only the manager for one single group. For example if the user has to enter the groupname manally.

Does anyone have an idea?

Thank you in advance.

Regard

Michael

Post Reply