tag:blogger.com,1999:blog-1055304911296529231.post3140415833495288599..comments2023-05-29T03:55:08.098-07:00Comments on MAllen22842's Blog: I don't want people requesting access to my stuff!!!Anonymoushttp://www.blogger.com/profile/09431266927721988332noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-1055304911296529231.post-21726328174665224632013-02-06T08:37:44.841-08:002013-02-06T08:37:44.841-08:00Now I can get rid of all the access request spam!Now I can get rid of all the access request spam!Ianhttps://www.blogger.com/profile/16630183458467180167noreply@blogger.comtag:blogger.com,1999:blog-1055304911296529231.post-10444390294392247152013-02-05T12:18:37.883-08:002013-02-05T12:18:37.883-08:00Yup I had something similar in C#. You've save...Yup I had something similar in C#. You've saved me the trouble of blogging it :)susanlhttps://www.blogger.com/profile/04467608503060142476noreply@blogger.comtag:blogger.com,1999:blog-1055304911296529231.post-58339409778270050352013-02-05T11:38:34.638-08:002013-02-05T11:38:34.638-08:00Hi Susanl -
By default SharePoint configures the a...Hi Susanl -<br />By default SharePoint configures the access requests for any given Site Collection to go to the person who created the Site Collection.<br /><br />I don't believe there is a way (non-programmatically) to go in an enable/disable a Site Collection and all it's sites via the browser. Though I suspect this can be done easily through PowerShell. Here is a script I tossed together that works for me on my local SharePoint installation.<br /><br />Add-PSSnapin Microsoft.SharePoint.Powershell<br />$webApp = Get-SPWebApplication<br />foreach ($spSite in $webApp.Sites)<br />{<br /> foreach ($spWeb in $spSite.AllWebs)<br /> {<br /> Write-Host "Checking Access Request status for " $spWeb.Title ", at " $spWeb.URL <br /> if (!$spWeb.HasUniqueRoleDefinitions)<br /> {<br /> # Access Request setting inherited from Parent<br /> Write-Host "--- Access Request setting inherited from parent site."<br /> }<br /> if ($spWeb.RequestAccessEnabled)<br /> {<br /> # Access requests are enabled<br /> Write-Host "--- Access Requests current go to: " $spWeb.RequestAccessEmail -foregroundcolor green<br /> <br /> # To edit who the e-mail goes too is easy. Just unrem this next line of code.<br /> # $spWeb.RequestAccessEmail = "john@doe.com"<br /> # $spWeb.Update()<br /> }<br /> else<br /> {<br /> # Access requests are disabled<br /> Write-Host "--- Access Requests are disabled for this site." -foregroundcolor red<br /> <br /> # To enable is easy as well. Just unrem this next line of code.<br /> # $spWeb.RequestAccessEnabled = true<br /> # $spWeb.RequestAccessEmail = "jane@doe.com"<br /> # $spWeb.Update()<br /> <br /> }<br /> }<br />}Anonymoushttps://www.blogger.com/profile/09431266927721988332noreply@blogger.comtag:blogger.com,1999:blog-1055304911296529231.post-24771319995988929792013-02-05T11:03:32.702-08:002013-02-05T11:03:32.702-08:00I should have said "a entire site collection ...I should have said "a entire site collection including the subsites". Christ I'm getting neurotic now about my every word - of course you know what I mean!susanlhttps://www.blogger.com/profile/04467608503060142476noreply@blogger.comtag:blogger.com,1999:blog-1055304911296529231.post-60599381498546099592013-02-05T10:53:32.285-08:002013-02-05T10:53:32.285-08:00Hi Michael! That reminds me of a utility I got ask...Hi Michael! That reminds me of a utility I got asked to create and run to update Access Request Emails for all sites in a collection. I must have a root around for that.<br /><br />But is there a way you can set that for an entire site collection via the UI? Just wondering as I couldn't find one...susanlhttps://www.blogger.com/profile/04467608503060142476noreply@blogger.com