How to Get User belong to different group in Different domain along with passing authentication using PowerShell script?
Should get different groups in different domain also how to pass authentication in order to get those groups whether user belong to those group or not
im using below command to get user belong to group.
Get-ADUser -Identity "userID" -Properties MemberOf
by this command gets current domain user i need user list of all domain user list and its group
To retrieve group memberships for a user across different domain, you'll have to connect to domain's Active Directory separately, and then query for the user's group memberships in that domain.