How to Bulk Set E-mail Address as UPN in Exchange Management Shell ------------------------------------------------------------------- 1. Check current AD scope ------------------------- Get-ADServerSettings 2. Set AD scope --------------- # Set scope to OU "SLO Development" in domain "netometer.local" Set-AdServerSettings -RecipientViewRoot "netometer.local/SLO Development" # Set scope to domain "netometer.local" Set-AdServerSettings -RecipientViewRoot "netometer.local" # Set scope to the whole forest - affects all domains Set-ADServerSettings -ViewEntireForest $true 3. Bulk Modify explicit UPN in Exchange Management Shell -------------------------------------------------------- # Store the list of mailbox enabled accounts in the $users variable # (Don't forget to refresh the variable each time you change the AD scope) $users = Get-Mailbox # Test/Preview the result with the WhatIf switch $users | ForEach {Set-User -Identity $_.Identity -UserPrincipalName $_.WindowsEmailAddress -WhatIf} # Set e-mail address as explicit UPN for all mailbox enabled accounts in the scope (WhatIf removed) $users | ForEach {Set-User -Identity $_.Identity -UserPrincipalName $_.WindowsEmailAddress} 4. Modify OWA to prompt fot E-mail address instead of Domain\Username ---------------------------------------------------------------------