Microsoft cloud engineer - SharePoint, Office 365, Azure, DotNet, Angular, JavaScript.
Microsoft cloud engineer - SharePoint, Office 365, Azure, DotNet, Angular, JavaScript.

How to Follow a site URL with PowerShell in SharePoint 2013

Background

While migrating from SharePoint 2010 to 2013 we needed to take MyLinks and replace with new Social Site Following.   Given a CSV with user names and site URLs I researched PowerShell options for programmatically making users follow sites.   Now we can pre-populate Follow Sites before launch.   The below code did the trick. 

shades_smile

 

Code

 

Screenshots

image
image

References

Support

If the target user does not yet have a MySite created you could see the below error.  The fix is simply to have them visit MySite – or – to upgrade their site collection from 2010 to 2013.

Exception calling “Follow” with “1” argument(s): “No personal site exists for the current user, and no further information is available. Internal type name: Microsoft.Office.Server.UserProfiles.SocialDataStoreException. Internal error code: 1.”

© Copyright 2016
@ SPJeff

Return to Top ▲Return to Top ▲