Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Getting Domain Using SamAccountName

$
0
0

Hi,

If I have a users SamAccountName how can I look up their domain? Once I get their domain I can return results in the format of <Domain>\<SamAccountName>

I already have the PowerShell needed using cmdlet (Get-ADGroupMember) to list out the SamAccountNames but am struggling in getting the domain.

Thanks in advance for help on this.

Cheers!


Viewing all articles
Browse latest Browse all 6937

Trending Articles