Skip to content

Instantly share code, notes, and snippets.

View pkskelly's full-sized avatar

Pete Skelly pkskelly

View GitHub Profile
. .\TopOfScript_PSCSOM.ps1
function listEventReceivers([Microsoft.SharePoint.Client.ClientContext]$context, [string]$listName)
{
Write-Host "Attempting to iterate event receivers on list '$listName'"
$list = $context.Web.Lists.GetByTitle($listName);
$context.Load($list)
$eventReceivers = $list.EventReceivers
$context.Load($eventReceivers)