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

Posted on 2011-02-18
Last Modified: 2012-05-11
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.
Question by:LPetersson
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
LVL 39

Expert Comment

by:Krzysztof Pytko
ID: 34925233
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).


Author Comment

ID: 34925244
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.
LVL 39

Accepted Solution

Krzysztof Pytko earned 200 total points
ID: 34925290
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.

Comparison of Amazon Drive, Google Drive, OneDrive

What is Best for Backup: Amazon Drive, Google Drive or MS OneDrive? In this free whitepaper we look at their performance, pricing, and platform availability to help you decide which cloud drive is right for your situation. Download and read the results of our testing for free!


Author Comment

ID: 34925360
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.

LVL 39

Expert Comment

by:Krzysztof Pytko
ID: 34925395
Are you sure that you have Universal groups ? Could you post syntax here, please?


Author Comment

ID: 35009729
Yupthey were universal groups and it eventually did work.

Thanks for the help.
LVL 39

Expert Comment

by:Krzysztof Pytko
ID: 35009813
You're welcome :)
LVL 59

Expert Comment

by:Darius Ghassem
ID: 35390655
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.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes my battle tested process for setting up delegation. I use this process anywhere that I need to setup delegation. In the article I will show how it applies to Active Directory
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question