Is there a way I can choose to remove a single user from all site collections within a single web application using powershell. There are number of user profiles whose domain account has been blocked or removed from the AD as such they need to be removed from the SharePoint sites as well.
I want a powershell script like this which takes two inputs :
removeuser.ps1 -webapplicationurl -domain\userid
On running this script , I should be able to delete the user (domain\userid) from all site collections with in the web application. Seeking someone to help me achieve this.
I have SharePoint 2010 and the solution I require needs to be 2010 compatible. Thanks in advance.