Wednesday, June 6, 2018

Update User Profile Email Address through Powershell

You may come up with requirement to update User Email address in SharePoint, you can use below script to do so:

$user = Get-SPUser -Identity <domain\user-id> -Web <”Web Application URL”>
$user | Select UserLogin,DisplayName,Email

Set-SPUser -Identity <domain\userId> -Email <email-id> -Web <”Web Application URL”>

Example:
$user = Get-SPUser -Identity “corp\mnj” -Web http://contoso.com:1111/
$user | Select UserLogin,DisplayName,Email

Set-SPUser -Identity “corp\mnj” -Email “mnj.plwl@contoso.com” -Web http://contoso.com:1111/

No comments:

Post a Comment

Distributed cache in SharePoint Farm

During maintainence and operational work there is specific sequence that needs to be followed for Dsitributed cache to disconnect and conne...