Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a multi-forest AD environment with trust relationships between domains in different forests. (AD level 2003)

I have a list of distinguishednames of users that I want to add to a local group in one of those domains.

How can I add a user to a group from the command line using the users DN? I can easily automate this with such a command and avoid having to do several hundred manual add commands though the GUI, but I can't find the command to use.

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

You can use dsmod group (http://technet.microsoft.com/en-us/library/cc732423(WS.10).aspx).

share|improve this answer
add comment

dsmod looks the simplest solution, but you can do it with a simple VBScript script. See http://www.microsoft.com/technet/scriptcenter/scripts/ad/groups/default.mspx?mfr=true for lots of examples.

JR

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.