SharePoint By Yagya Shree

Changing SharePoint Site Access request email

leave a comment »

In a SharePoint site collection, when you want to change site access request email on all levels of sites and subsites below it, then we can use below powershell script to achieve this easily:

Script :
$content = Get-Content C:\scripts\owners.txt
foreach($tsite in $content)
$site = Get-SpSite $tsite
foreach($tempweb in $site.AllWebs)

                $str = $tempweb.RequestAccessEmail.ToLower()
                if(($str -eq “Email Address old 1”) -or ($str -eq “Email Address Old 2”))
                                $tempweb.RequestAccessEmail = “Email Address New”
                                $tempweb.Url | out-file C:\scripts\SiteEmailUpdate.txt -append -width 1000
                                Write-Host $tempweb.Url



Written by Yagyashree

September 22, 2012 at 3:31 pm

Posted in sharepoint

Tagged with , , ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: