In our SP2013 farm, MySite Deletion job is not enabled. We are now in a situation where we have to identify the Mysites of users who had already left the organisation.

How can this be identified? any help would be appreciated

1 Answer 1


Using PowerShell, loop through the sites and compare them to AD. If a site owner is not in AD, output the result. With the result set, you can update the MySite owner to someone else or delete the site.

Basic script to get the ball rolling.

$sites = Get-SPWebApplication "http://mysite.yourUrl.com" | Get-SPSite -Limit All 

foreach($site in $sites)
    Write-Host $site.Owner

You can look at the site owner or the URL depending on how you have MySites configured.

In my farm, the site name format is setup like this:


Using the script above you could also parse the URL to get the AD username.

Also, if you Google 'sharepoint dead account clearner', you will get results that are geared toward removing inactive users from SP. The same logic could be applied to removing the MySites.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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