Viewing all configured alerts in SharePoint 2010

Recently one of my clients had an issue where SharePoint 2010 was sending too many alerts and I wanted to see how many were configured across the top-level site and its sub-sites. During my troubleshooting, I was hoping that I could see what times the next alert(s) would fire and for which user(s). Well, with PowerShell this is possible and I wanted to post for others.

# Get the Alerts of Entire Site collection
$SPsiteCollection = Get-SPSite "<<TOP-LEVEL SHAREPOINT SITE>>"
# Iterate through all Webs in the Site Collection 

foreach($SPweb in $SPsiteCollection.AllWebs) {
	foreach($alert in $SPweb.Alerts) {
		Write-Host "Alerts List     : " $alert.ListUrl
		Write-Host "Alerts Title    : " $alert.Title
		write-Host "Subscribed User : " $alert.User.Name
		Write-Host "Frequency       : " $alert.AlertFrequency
		Write-Host "Time            : " $alert.AlertTime
		Write-Host "Deliverly       : " $alert.DeliveryChannels
		Write-Host "Event Type      : " $alert.EventType
		Write-Host "-----------------------------------------"

Leave a Reply

Your email address will not be published. Required fields are marked *