Monday 5 January 2015

Script to Remove Duplicate Registration of Event Receiver



# List all the Events registered
$weburl = "http://SharepointWeb"
$spweb = Get-SPWeb $weburl
$spList = $spWeb.Lists["ListName"]
$spList.EventReceivers | Select Name, Assembly, Type

# Remove the Event Registration at index 0
$spList.EventReceivers[0].delete()

No comments:

Post a Comment