PowerShell to export email addresses for AD users:
Get-ADUser -Filter * -Properties proxyaddresses,EmailAddress | Select-Object Name,UserPrincipalName,EmailAddress, @{L = "ProxyAddresses"; E = { ($_.ProxyAddresses -like 'smtp:*') -join ";"}} | Export-Csv -Path C:\temp\AdUsersProxyAddresses.csv -NoTypeInformation
No comments:
Post a Comment