Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On the SharePoint 2010 MySite EditProfile.aspx, there are settings for Email Notifications:

[x] Notify me when someone leaves a note on my profile.
[x] Notify me when someone adds me as a colleague.
[x] Send me suggestions for new colleagues and keywords.

Select which e-mail notifications you want to receive. 

Unfortunately, they default to having all three options checked. I would like to set different defaults for all users, present and future and have them explicitly Opt in to these.

Is there any way to do that? The idea of just executing a SQL UPDATE to set Property 5040 to 7 fails because that property doesn't exist by default in the database, and if SharePoint can't find it in the database it defaults to 0 (=all checked).

share|improve this question

I had a similar issue and found a neat PowerShell command that looks like it does the trick here. Below is the code from the blog article, just remove the comments and run.

I did it in my test environment and there were a few minor errors but worked like a charm! Only thing is, new users will have it enabled by default which is a bummer:

#Load the SharePoint snap-in
Add-PsSnapin Microsoft.SharePoint.PowerShell;

#Load the SharePoint assemblies

#Specify the MySite URL
$MySiteUrl = "";

#Get the server context for the profile manager
$site = Get-SPSite $MySiteUrl;
$ServerContext = Get-SPServiceContext $site;
$UPManager = new-object Microsoft.Office.Server.UserProfiles.UserProfileManager($ServerContext);

#Count variables
$ucount = 0;

$enumProfiles = $UPManager.GetEnumerator();
"Total User Profiles available:" + $UPManager.Count

#Loop through the profile entries and update the property
#Recieve Instant Notifications - NGAllowMetaEmail (bool)
#24 Hour Digest Email - NGReceiveDigestEmail (bool)
#RSS NewsFeed Email - NGAllowRssEmail (bool)
#SharePoint Notification emails - SPS-EmailOptin (int)
#This field has 3 values one for each email type

foreach ($oUser in $enumProfiles)
    $count = $count + 1;
    $u = $oUser.Item("Accountname");
    Write-Output "($count):  Setting values for $u";

    $oUser["NGAllowMetaEmail"].Value = $false;
    $oUser["NGReceiveDigestEmail"].Value = $false;
    $oUser["NGAllowRssEmail"].Value = $false;
    $oUser["SPS-EmailOptin"].Value = 111; 


#Dispose of site object
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.