Set default email for Office 365
| August 6th, 2017
Depending on the information stored for the users in the AD, there is two ways this can be accomplished:
1.Set email field and default email in ProxyAddresses according to UserPrincipalName:
$users = Get-ADUser -Filter * -properties EmailAddress -SearchBase "ou=Test,ou=Departments,dc=DOMAIN,dc=COM"
foreach ($user in $users) {
$useremail = $user.UserPrincipalName
Set-ADUser $user -Add @{'ProxyAddresses' = ("SMTP:"+$useremail )} -EmailAddress $useremail
}
2. Set default email in ProxyAddresses Read more [...]