Friday, December 20, 2013

View all the event receivers for a SharePoint list from Windows PowerShell ISE

Trying out event receivers in SharePoint I wanted to see which event receivers I have attached to my list. From here and here I was finally able to get a small script which when run in Windows PowerShell ISE would give you just that.


The Add-PSSnapin command adds the SharePoint snap-in to current session so that you can use the commands like Get-SPSite. If you don't add that then you would end up with the error "The term 'Get-SPSite' is not recognized as the name of a cmdlet, function…". Also once you run the command of Add-PSSnapin then you need not run it again and again for current session.

No comments:

Post a Comment