PowerShell script to show the access request email address for all sites
I have written this script to determine whether or not Access Requests are enabled for each site within a given Site Collection, and if so display the email address specified. The colour coded output makes it easy to see which sites have Access Requests enabled.
# ===========================================
#
# SharePoint 2010 PowerShell script to list
# the Access Request address for all sites
# within a given Site Collection
#
# Author: David Webb
# Date: 15th November 2012
# Version: 1.0
#
# ===========================================$Webs = Get-SPWeb -Site “http://intranet”
ForEach ($Web In $Webs)
{
If ($Web.RequestAccessEnabled -eq “True”)
{
Write-Host $Web.title “- ” -NoNewLine; Write-Host “enabled and sent to” $Web.RequestAccessEmail -ForegroundColor “Green”
}
Else { Write-Host $Web.title “- ” -NoNewLine; Write-Host “disabled” -ForegroundColor “Red”
}
}
Here is a screenshot of the output:
![[BlogBookmark]](http://www.adventuresinsharepoint.co.uk/wp-content/plugins/bookmarkify/blogbookmark.png)
![[Blogsvine]](http://www.adventuresinsharepoint.co.uk/wp-content/plugins/bookmarkify/blogsvine.png)
![[del.icio.us]](http://www.adventuresinsharepoint.co.uk/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](http://www.adventuresinsharepoint.co.uk/wp-content/plugins/bookmarkify/digg.png)
![[Facebook]](http://www.adventuresinsharepoint.co.uk/wp-content/plugins/bookmarkify/facebook.png)
![[Furl]](http://www.adventuresinsharepoint.co.uk/wp-content/plugins/bookmarkify/furl.png)
![[Google]](http://www.adventuresinsharepoint.co.uk/wp-content/plugins/bookmarkify/google.png)
![[LinkedIn]](http://www.adventuresinsharepoint.co.uk/wp-content/plugins/bookmarkify/linkedin.png)
![[MySpace]](http://www.adventuresinsharepoint.co.uk/wp-content/plugins/bookmarkify/myspace.png)
![[Reddit]](http://www.adventuresinsharepoint.co.uk/wp-content/plugins/bookmarkify/reddit.png)
![[Slashdot]](http://www.adventuresinsharepoint.co.uk/wp-content/plugins/bookmarkify/slashdot.png)
![[StumbleUpon]](http://www.adventuresinsharepoint.co.uk/wp-content/plugins/bookmarkify/stumbleupon.png)
![[Twitter]](http://www.adventuresinsharepoint.co.uk/wp-content/plugins/bookmarkify/twitter.png)
![[Windows Live]](http://www.adventuresinsharepoint.co.uk/wp-content/plugins/bookmarkify/windowslive.png)
![[Yahoo!]](http://www.adventuresinsharepoint.co.uk/wp-content/plugins/bookmarkify/yahoo.png)
![[Email]](http://www.adventuresinsharepoint.co.uk/wp-content/plugins/bookmarkify/email.png)