I am using below function to get AD group details along with foreign principals. However I want to get recurse data of AD group along with foreign principals:
Can anyone please help me with AD group details with recurse and foreign principals. Any help would be appreciated.
The reason for this is I am working on File servers migration from one domain to another and I am facing issues in that.
I want to match both domain groups data in recursive. Processing: Get-ForignPrincipals.txt…
What’s your actual question here? Is there something not working? Does your code not produce the output you’d expect? You explained what you want and some code but not what the problem is you’re facing.
… actually do the job? I don’t have experiences with diffent domains but I’d expect you can distinguish accounts from different domains with their DistinguishedNames.
Thanks for your quick response. Let me explain the issue.
We have 2 domains with bi-directional trust.
Old Domain
New Domain
Old domain will be decom in coming months so I am working on project to migrate our all file servers and their shares to new domain. However we will still have old domain name space DFS file share till it is decom. So we need to map the permissions for both the domains.
Now the issue will occur when users use old DFS name space share from new domain ID. The problem is we can’t add Domain Local groups from old domain to new domain. We are left with only option to map both domain groups user.
There are new domain users added in old domain group at the time of domain migration may be done by third party using some tools.
When I fetch ADGroup member of old domain, it doesn’t give output because that group has new domain users added as foreign principals. So I am using above function to fetch users even if they are foreign principals. That function works only to fetch parent group members and doesn’t have recurse option. I want to have recurse option where I can get group’s recurse data as well as foreign principals.
So Get-ADGroupMember -Identity ‘’ -Recursive gives below error due to foreign principals in the group:
We don’t have any option apart from matching groups data manually. So I am looking for something to add new in above function or complete new way to fetch recurse along with foreign principals of group.