John Chapman

[SharePoint 2010] Set Access Request Email for All SharePoint Sites

Share on TwitterShare on LinkedInShare on TumblrSubmit to StumbleUponSave on DeliciousDigg ThisSubmit to reddit

I recently needed to set the email address that Access Requests from SharePoint 2010 go to for all sites int the Web Application. Since there is no way to do this in bulk within the interface, I found this blog post outlining a useful PowerScript commant that parses through each SPWeb and sets the Access Request email for all SPWebs that do not inherit from their parent SPWeb. I have posted it here in case someone else might find this useful:

$webapp = Get-SPWebApplication "http://WebAppToSendFrom"
foreach($site in $webapp.Sites)
{
    foreach($web in $site.AllWebs)
    {
		Write-Host $web.url
		if(!$web.HasUniquePerm)
		{
			Write-Host "Access Request Setting is inherted from parent."
		}
        else
		{
			$web.RequestAccessEmail = "EmailToSendRequest@To.com"
            $web.Update()
			Write-Host "Done."
		}
	}
}

Source

Share on TwitterShare on LinkedInShare on TumblrSubmit to StumbleUponSave on DeliciousDigg ThisSubmit to reddit

John Chapman

Hello, I'm John Chapman. I am a SharePoint developer living in Denver, Colorado. I develop solutions using ASP.NET, C#, jQuery, SQL, SharePoint, etc, and I thrive on the challenge of writing code to overcome the impossible, annoying, or otherwise difficult obstacles.

More Posts - Website - Twitter

Leave a comment

John Chapman