I am trying to add users from domain/forest B to groups in domain/forest A
The below cmdlets achieve that goal however the user gets added and only shows their Windows username from Domain B but that makes no sense in terms of identifying the user.
If I use the ADUC GUI and search the remote domain and add the user to the group I get the Full Name and the DN of the user.
I have obfuscated the information from the screenshot but the top arrow shows the user added by the gui and the bottom one shows the user added by the script.
Is there a way to achieve the GUI result programmatically?
$DomainBUser = Get-ADUser "Joe.Bloggs" -Server 10.242.88.3
Add-ADGroupMember -identity DomainAGroup -Members $DomainBUser