10 thoughts on “Following sites using PowerShell and the Social API in SharePoint 2013

  1. Your post was very helpful, however i have a different problem:
    I need to make all users on the site to follow a set of users using powershell. Is it possible?
    As of now i have seen articles making users follow specific site or making current user to follow others. Is there a way to make by default every user on the site to follow a set of users

    1. You should look into the lines where the type of the sosial actor is set. Change the type of SPSocialActorType to User and set the value in a proper manner and I guess it would work.

  2. Nice script! Thanks for sharing!

    I am facing this problem:

    Exception calling “Follow” with “1” argument(s): “The operation failed because an internal error occurred. Internal
    type name: Microsoft.Office.Server.UserProfiles.FollowedContentException. Internal error code: 11.”
    At C:\Scripts\MakeUserFollowSharePointSite.ps1:20 char:9

    + $followingManager.Follow($socialActor)
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : SPSocialException

    Has anyone been experiencing the same error with this script?

    Help would be appreciated. Thanks a lot.

      1. Hey Are Flyen, we are on version 15.0.4841.1000 (CU July 2016). Have tried to modify the script in may ways. Still no success.
        If it is “version-related” then we may have no chance. Thanks for your effort and answer.

  3. Ok – bit of a newbie here but, love the idea of the script, the only modification that needs to be made to run it appears to be adding the site in the line – $socialActor.ContentUri = “http://intranet/sites/important-news-from-corp” # REPLACE THIS WITH YOUR SITE. Is that correct? Thank you so much for putting this up here!

  4. Thanks for this nice post. I wonder if it is possible to run the script only for user within a certain security group in Office365 and if it is also possible to run two scripts, meaning one script for each of the two groups (with different sharepoint sites to follow). Any help would be highly appreciated!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s