Set-PnPRequestAccessEmails

Sets Request Access Email on a web

Syntax

Set-PnPRequestAccessEmails
   [-Emails <String[]>]
                             [-Disabled [<SwitchParameter>]]
                             [-Web <WebPipeBind>]
                             [-Connection <PnPConnection>]

Description

Enables or disables access requests to be sent and configures which e-mail address should receive these requests. The web you apply this on must have unique rights.

Examples

------------------EXAMPLE 1------------------

Set-PnPRequestAccessEmails -Emails someone@example.com

This will enable requesting access and send the requests to the provided e-mail address

------------------EXAMPLE 2------------------

Set-PnPRequestAccessEmails -Disabled

This will disable the ability to request access to the site

------------------EXAMPLE 3------------------

Set-PnPRequestAccessEmails -Disabled:$false

This will enable the ability to request access to the site and send the requests to the default owners of the site

Parameters

-Connection

Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.

Type:PnPConnection
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Disabled

Enables or disables access to be requested

Type:SwitchParameter
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Emails

Email address to send the access requests to

Type:String[]
Position:Named
Accept pipeline input:False
Accept wildcard characters:False
-Web

This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead. Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.

Type:WebPipeBind
Position:Named
Accept pipeline input:False
Accept wildcard characters:False