How to set up Access Requests in SharePoint online using Powershell?

Hello SharePointers, Below are the powershell commands to set up the access requests in SharePoint Online.

$URL= ""
$Cred = Get-Credential
$Cred = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.UserName,$Cred.Password)

    $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($URL)
    $Ctx.Credentials = $Cred
    $Web = $Ctx.Web
    #Set Access request Email
    $Web.RequestAccessEmail =$AccessRequest
    #Member settings
    $Web.MembersCanShare = $True
    $web.AssociatedMemberGroup.AllowMembersEditMembership = $True

Happy SharePointing Folks 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *