Pergunta

I am trying to get all event receivers in a site collection for all lists and libraries.

Is there any way to do so?

I have got articles where they find it for content types but not for any lists.

Foi útil?

Solução

The PowerShell below for your reference:

$site = Get-SPSite "http://sp2013/sites/team"
foreach ($web in $site.AllWebs)
{
    $web.Title
    $web.Lists | Where {$_.EventReceivers.Count -gt 0} |  Select Title,EventReceivers | Format-List
}

Outras dicas

The article SharePoint 2010: Find Event Receivers Attached to Lists describes how this can be done for SP2010 with PowerShell, but it should equally work for 2013.

$GC = Start-SPAssignment            
$Site =  $GC | Get-SPSite http://yourserver/sites/yoursite            
$Web = $Site.Rootweb            
$Web.Lists |            
   Where {$_.EventReceivers.Count -gt 0} |            
   Select Title,EventReceivers |            
   Format-List            
Stop-SPAssignment $GC
Licenciado em: CC-BY-SA com atribuição
Não afiliado a sharepoint.stackexchange
scroll top