external help file | applicable | schema |
---|---|---|
SharePoint Server 2013, SharePoint Server 2016, SharePoint Online |
2.0.0 |
Adds a new remote event receiver
Add-PnPEventReceiver -Name <String>
-Url <String>
-EventReceiverType <EventReceiverType>
-Synchronization <EventReceiverSynchronization>
[-List <ListPipeBind>]
[-SequenceNumber <Int>]
[-Force [<SwitchParameter>]]
[-Web <WebPipeBind>]
[-Connection <SPOnlineConnection>]
PS:> Add-PnPEventReceiver -List "ProjectList" -Name "TestEventReceiver" -Url https://yourserver.azurewebsites.net/eventreceiver.svc -EventReceiverType ItemAdded -Synchronization Asynchronous
This will add a new remote event receiver that is executed after an item has been added to the ProjectList list
PS:> Add-PnPEventReceiver -Name "TestEventReceiver" -Url https://yourserver.azurewebsites.net/eventreceiver.svc -EventReceiverType WebAdding -Synchronization Synchronous
This will add a new remote event receiver that is executed while a new subsite is being created
The type of the event receiver like ItemAdded, ItemAdding. See https://msdn.microsoft.com/en-us/library/microsoft.sharepoint.client.eventreceivertype.aspx for the full list of available types.
Type: EventReceiverType
Parameter Sets: (All)
Aliases: Type
Required: True
Position: Named
Accept pipeline input: False
Overwrites the output file if it exists.
Type: SwitchParameter
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
The list object or name where the remote event receiver needs to be added. If omitted, the remote event receiver will be added to the web.
Type: ListPipeBind
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
The name of the remote event receiver
Type: String
Parameter Sets: (All)
Required: True
Position: Named
Accept pipeline input: False
The sequence number where this remote event receiver should be placed
Type: Int
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
The synchronization type: Asynchronous or Synchronous
Type: EventReceiverSynchronization
Parameter Sets: (All)
Aliases: Sync
Required: True
Position: Named
Accept pipeline input: False
The URL of the remote event receiver web service
Type: String
Parameter Sets: (All)
Required: True
Position: Named
Accept pipeline input: False
Optional connection to be used by cmdlet. Retrieve the value for this parameter by eiter specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
Type: SPOnlineConnection
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
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
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False