Friday, May 3, 2013

SharePoint 2010: Purging the Activity Feed

SharePoint 2010 per default aggregates the last 14 days worth of social activities and displays them on the user’s MySite.

Recently I noticed that when user A leaves a note on user B’s wall, and subsequently deletes this note, that the note will only be deleted from the user A’s wall but will still show on the user B’s wall.

The only way to delete individual activities is by directly accessing the User Profile Database which is not supported, However, it is easy to delete all activities:

$ups = Get-SPServiceApplication <GUID of UPA> 
$ups.DaysWorthOfActivityFeedsToKeep = 0
Now execute the User Profile Service Application - Activity Feed Cleanup Job Timer job – this will purge all activites older than 0 days, i.e. all activities from the queue.
After you’re done, you can return to the default setting of 14 days:
$ups = Get-SPServiceApplication <GUID of UPSA>
$ups.DaysWorthOfActivityFeedsToKeep = 14

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.