在SharePoint 2010 MySite EditProfile.aspx上,有电子邮件通知的设置:
[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.
不幸的是,他们默认选中所有三个选项。 我想为所有用户设置不同的默认值,现在和将来,并明确地让他们select这些。
有没有办法做到这一点? 只是执行一个SQL更新设置属性5040到7的想法失败,因为该属性在数据库中默认情况下不存在,如果SharePoint无法在数据库中find它默认为0(=所有选中)。
我有一个类似的问题,发现一个整洁的PowerShell命令,看起来像它在这里做的伎俩。 以下是来自博客文章的代码,只是删除评论和运行。
我在我的testing环境中做了这个,但有一些小小的错误,但是像一个魅力一样工作! 唯一的事情是,新用户将默认启用它是一个令人失望的:
#Load the SharePoint snap-in Add-PsSnapin Microsoft.SharePoint.PowerShell; #Load the SharePoint assemblies [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server"); [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server.UserProfiles"); #Specify the MySite URL $MySiteUrl = "http://sharepoint.yoursite.com/"; #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 $count=0; #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; $oUser.Commit(); } #Dispose of site object $site.Dispose();