Update SharePoint user email SPUser.Email
It's not very often but sometimes I have to update SharePoint user email in profile. Here's a simple powershell code to do it.
#update SPUser email if ((Get-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue) -eq $null) { Add-PSSnapin Microsoft.SharePoint.PowerShell } $webUrl = "https://spdev" $spweb = Get-SPWeb $webUrl $userlogin = "mydomain\userLogin" $newUserEmail = "Name.LastName@mycompany.com" Set-SPUser -Identity $userlogin -Email $newUserEmail -Web $webUrl #Let's check that everything's ok $user = Get-SPUser -Identity $userlogin -Web $webUrl Write-Host $user.Email