如何使用加入域的计算机中的 UPN\用户名查询 Active Directory 中的用户电子邮件?
使用powershell
Get-ADUser -Filter { UserPrincipalName -eq "[email protected]" } -Properties EmailAddress | Select-Object Name, EmailAddress
或
Get-ADUser -Filter { SAMAccountName -eq "username" } -Properties EmailAddress | Select-Object Name, EmailAddress