How to use DSMOD to add user from a different domain to a Distribution List or Security Group

LPetersson
LPetersson used Ask the Experts™
on
I may be doing something wrong when I try to add a user from another domain in the forest using DSMOD.

This is the syntax I use:
dsquery user forestroot -name "<NAME OF USER>" | dsmod group "DN OF GROUP" -addmbr

When I use that command and the user is in the London domain it works fine, but if I try with a user from, for example, Japan, then it fails with the error: The specified group type is invalid.

This happens for both Security and Distribution groups. And they are, naturally, universal groups.

If I add the users via Active Directory Users & Groups MMC, then I can add them fine.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Krzysztof PytkoSenior Active Directory Engineer
Top Expert 2012

Commented:
You should place global group(s) into universal groups and then add only users to global groups within their domain. DS Tools don't allow for adding members from different domains directly to the groups in other domain(s).

Regards,
Krzysztof

Author

Commented:
Really? Damn, that's a shame.

Well, I would prefer to use groups like that, but this client isn't too keen on nested groups except where absolutely necessary.
Senior Active Directory Engineer
Top Expert 2012
Commented:
OK, that's not true :)
I checked it in my test environment and it works fine :) (you cannot do that for global groups in remote domain because it is not supported)

check this syntax

dsquery user "dc=domain,dc=com" -name "User Name" | dsmod group "cn=groupname,ou=OUlocation,dc=domain2,dc=com" -addmbr

You need for that at least Domain Functional Level at Windows 2003 mode.

Krzysztof
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
Hmmm, unfortunately that doesn't work for me.

When I use that syntax I still get the error: The specified group type is invalid.

Our domain functional level is indeed Windows 2003 mode.

Krzysztof PytkoSenior Active Directory Engineer
Top Expert 2012

Commented:
Are you sure that you have Universal groups ? Could you post syntax here, please?

Krzysztof

Author

Commented:
Yupthey were universal groups and it eventually did work.

Thanks for the help.
Krzysztof PytkoSenior Active Directory Engineer
Top Expert 2012

Commented:
You're welcome :)
Top Expert 2012

Commented:
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial