The script can be used to re-create the user profile feed identifier property. If this property is not set the user will not be able to use Social features like newsfeed on my site host.
Add-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue $MySiteHost = new-object Microsoft.SharePoint.SPSite("https://mysites.contoso.com/"); $ServiceContext = [Microsoft.SharePoint.SPServiceContext]::GetContext($MySiteHost); $ProfileManager = new-object Microsoft.Office.Server.UserProfiles.UserProfileManager($ServiceContext); $profile = $ProfileManager.GetUserProfile("contoso\adamb"); $Site = $profile.PersonalSite $Site | Select *
$Site.RootWeb.Created
#If Personal Site needs to be created. The feed Identifier will be added automatically in that case. #$profile.CreatePersonalSite() $profile.FeedIdentifier
#If My Site Already Exist. $microFeedId = ($Site.Url + ";1." + $Site.ID.ToString().Replace("-", "") + "." + $Site.RootWeb.ID.ToString().Replace("-", "") + "." + $Site.RootWeb.Lists["Microfeed"].ID.ToString().Replace("-", "") + ".0c37852b34d0418e91c62ac25af4be5b") $profile["SPS-FeedIdentifier"].Value = $microFeedId $profile.Commit()
$Site.Dispose()
$MySiteHost.Dispose()