Archive

Posts Tagged ‘upn’

Powershell script to change User Principal Name to Primary SMTP Address

October 2nd, 2013 No comments

When you install Exchange in environment you want to allow users to log into mails using their e-mail address. If your domain name is different from your e-mail domain, you have to add UPN suffix first. More abour it HERE. Then you need to change User Principal Name into Primary SMTP Address. I wrote little script to do so:

Get-Mailbox |
  ForEach-Object{
   Write-Host “For: ” + $_.SamAccountName
   Write-Host ”   – change UPN from: ” + $_.UserPrincipalName + ” to: ” + $_.PrimarySmtpAddress
   Set-ADUser -Identity $_.DistinguishedName -UserPrincipalName $_.PrimarySmtpAddress
 }

Have a nice day,

Categories: Exchange, Microsoft, Powershell Tags: ,

How to add UPN Suffix

August 19th, 2011 1 comment

Sometimes when you install Exchange, you want to allow users to use their e-mail addresses as a login name. Most of the time UPN suffixes are not usefull. For example you have internal name for domain “company.corp”, but your e-mail addresses are “username@company.com“. You want to give an option for users to log into OWA using “username@company.com” instead of “company.corp\username”.

Read more…