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]](https://www.adventuresinsharepoint.co.uk/wp-content/plugins/bookmarkify/blogbookmark.png)
![[Blogsvine]](https://www.adventuresinsharepoint.co.uk/wp-content/plugins/bookmarkify/blogsvine.png)
![[del.icio.us]](https://www.adventuresinsharepoint.co.uk/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](https://www.adventuresinsharepoint.co.uk/wp-content/plugins/bookmarkify/digg.png)
![[Facebook]](https://www.adventuresinsharepoint.co.uk/wp-content/plugins/bookmarkify/facebook.png)
![[Furl]](https://www.adventuresinsharepoint.co.uk/wp-content/plugins/bookmarkify/furl.png)
![[Google]](https://www.adventuresinsharepoint.co.uk/wp-content/plugins/bookmarkify/google.png)
![[LinkedIn]](https://www.adventuresinsharepoint.co.uk/wp-content/plugins/bookmarkify/linkedin.png)
![[MySpace]](https://www.adventuresinsharepoint.co.uk/wp-content/plugins/bookmarkify/myspace.png)
![[Reddit]](https://www.adventuresinsharepoint.co.uk/wp-content/plugins/bookmarkify/reddit.png)
![[Slashdot]](https://www.adventuresinsharepoint.co.uk/wp-content/plugins/bookmarkify/slashdot.png)
![[StumbleUpon]](https://www.adventuresinsharepoint.co.uk/wp-content/plugins/bookmarkify/stumbleupon.png)
![[Twitter]](https://www.adventuresinsharepoint.co.uk/wp-content/plugins/bookmarkify/twitter.png)
![[Windows Live]](https://www.adventuresinsharepoint.co.uk/wp-content/plugins/bookmarkify/windowslive.png)
![[Yahoo!]](https://www.adventuresinsharepoint.co.uk/wp-content/plugins/bookmarkify/yahoo.png)
![[Email]](https://www.adventuresinsharepoint.co.uk/wp-content/plugins/bookmarkify/email.png)