Monthly Archives: February 2012

User leaves company, comes back, SharePoint is not happy…

If a user’s Active Directory (AD) account is deleted, then re-added, they will have a different SID and this will cause some trouble in SharePoint.

In SharePoint 2007 & 2010 the fix for this is easy:

Powershell script to add a list of users to the site collection administrators group of every site on your SharePoint 2010 farm.

I wanted a way to inject myself as a site collection admin into every site in sharepoint, Note, I’m not talking about the primary/secondary that you can set in Central admin.
I’m talking about that group you can only get to from within each site itself. Or in this case, with the powershell script below…
Note that it takes an array of names – if you have a team of admins or developers that all need access, you can put all their names in the list.

 

Here’s another version of the script, this one also takes an array of top level URL’s

It’s handy if you have lots of url’s on your site and only want to work with a few of them.