Script to remove disabled users from SharePoint2013

Brass Contributor

We have SP2013.
We had some users leave the organization.
They have been disabled in AD however they are still present on SharePoint.
Is there any easier way to remove these users who are disabled in AD to be removed from Sharepoint also?

Any script which will help me?

thank you !!

2 Replies
Take a look to the TechNet Script Gallery...what you are looking for could be there: https://gallery.technet.microsoft.com/ also the PowerShell gallery: https://www.powershellgallery.com/
On our SP 2010 instance we would filter out deprovisioned employees based upon criteria from our Active Directory. For example clearing a field in AD when they were deprovisioned, this would then clear them from SharePoint fields (they'd still be on historic things but they're profiles would be gone).

Here is an older reference:
http://www.harbar.net/archive/2011/02/22/323.aspx