Powershell script to change User Principal Name to Primary SMTP Address
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,
Do you have any video of that? I’d like to find out some additional information.
I am in fact grateful to thee holder of this web page who has shared
this enormous post at att this place.
I’m amazed, I must say. Rarely do I encounter a blog that’s both equally educative
and entertaining, and without a doubt, you have hit the nail on the head.
The issue is something which too few folks are speaking intelligently about.
Now i’m very haqppy that I found this during my hjnt for something
concerning this.
My coder is trying too persuade me to move to .net from PHP.
I havge always disliked the idea because of the costs. But he’s tryiong none the less.
I’ve been using Movable-type on various websites for about a year and am anxious about
switching to another platform. I have heard excellent things about blogengine.net.
Is there a waay I can import all my wordpress posts into it?
Any help would be really appreciated!
It’s an awesome article in favor oof all the internet viewers; they will
take advantage from it I am sure.
you’re in reality a just right webmaster. The website loading sppeed is amazing.
It seems that you are doing any uunique trick. In addition, The
contents are masterpiece. you have performed a fantastic activity in this subject!