1

I want to regularly remove MySites which have been created and remain unused (i.e. never accessed).

Ideally the criteria for this would be:

  • Created more than 7 days ago (Which I can get using CertificationDate, I think)
  • Never accessed

I can't see how to do this. I've looked at the MySite Site Collection properties in SharePoint Manager, and has a sort of half-baked idea involving lastsecuritymodified and lastcontentmodified but it came to nothing.

So my questions are as follows:

a. Can this be done?

b. If not, why not?

c. If so, what can I check to make this happen?

Thank you

1

The built in MySite cleanup job handles this automatically:

What is the My Site Cleanup Timer Job

The My Site Cleanup Job is responsible for deleting user profiles and My Sites of those users. This includes the following activities:

  • Remove user profiles that are queued for deletion.
  • If those users have a My Site, assign the user’s manager as the SPSite.SecondaryContact.
  • Email the manager letting them know that the user’s My Site will be deleted in 14 days.
  • 11 days after the first notification, email the manager again letting them know that the My Site will be deleted in 3 days.
  • After a total of 14 days, delete the MySite.

Source

More here, for 2010 but it's the same in 2013, http://blogs.msdn.com/b/kaevans/archive/2012/06/25/top-recommendations-for-managing-the-my-site-cleanup-timer-job.aspx

  • Robert, thanks. The users and their profiles aren't going anywhere, just their (unused) mysites. It's the site I need to get rid of. – Brongers Croste May 9 '14 at 14:03
  • Why would you want to delete the sites for existing users? Users content and feed information is stored there – Robert Lindgren May 9 '14 at 14:12
  • It's my understanding that users don't have a mysite until they provision it themselves. So if they provision it and then don't use it, no content is added? However we have allocated a certain amount of space for that mysite, which we'd like to reclaim. – Brongers Croste May 9 '14 at 14:25
0

Related questions is here Tracing user profile changes without iterating all the through?

You could activate your profile change tracking and then access the user change object to get at that data. I would consider the reason for doing so - if they have not done anything with it the footprint is minimal. If there is a chance they will be using it in the future then it's better to leave it there vs. having to reprovision it.

One more reason - every now and then SharePoint won't recognize that you have deleted the mysite and instead of creating a new one will show the user an error. Then you will need to go in and manually correct the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.