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.
From serverfault
DrStalker
-
You can use
dsmod group
(http://technet.microsoft.com/en-us/library/cc732423(WS.10).aspx).From Per Noalt -
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
From John Rennie
0 comments:
Post a Comment