Try with the following powershell codes,
Get all Alerts for an user in SharePoint with PowerShell:
Display All alerts for a Particular List
$SPWeb = Get-SPWeb "http://SharePointSite.com"
#Relative URL of list/document library. For lists "Lists/Tasks"
$SPListURL = "Shared Documents"
foreach($alert in $SPWeb.Alerts)
{
if($alert.ListUrl -eq $SPListUrl)
{
"User Name - " + $alert.User.Name
"Title - " + $alert.Title
"Frequency - " + $alert.AlertFrequency
"Delivery Via - " + $alert.DeliveryChannels
"Change Type - " + $alert.eventtype
Write-Host "=================================="
}
}
$SPweb.Dispose()
Get Alerts for a Particular User
##### Get alerts for a particular user #########
$SPsite = Get-SPSite "http://SharePointSite.com"
$SPweb=$SPsite.RootWeb
$SPuser=$SPweb.EnsureUser('Domain\Salaudeen')
$SPalertCollection=$SPuser.Alerts
foreach($alert in $SPalertCollection)
{
write-host -f Green $alert.Title
}
Find All Alerts of an User in Entire Site collection
$SPsiteCollection = Get-SPSite "http://SharePointSite.com"
# 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
}
}
Find all the Alerts for a specific user across the web:
# ? is the alias for where-object cmdlet
$web.Alerts | ? {$_.UserId -like "Domain\Salaudeen"}
Get all the alerts for a user across the entire site collection:
$site.AllWebs | select -expand Alerts | ? {$_.UserId -like "Domain\Salaudeen"
Delete user alerts in SharePoint 2010 with PowerShell
##### Remove all alerts for specific user from a Web Application #####
$SPwebApp = Get-SPWebApplication "http://SharePointSite.com"
$SpecificUser = "Domain\Salaudeen"
foreach ($SPsite in $SPwebApp.Sites)
{
# get the collection of webs
foreach($SPweb in $SPsite.AllWebs)
{
$alerts = $SPweb.Alerts
# if 1 or more alerts for a particular user, Make a note of them by copying their ID to an Array
if ($alerts.Count -gt 0)
{
$myalerts = @()
foreach ($alert in $alerts)
{
if ($alert.User -like $SpecificUser)
{
$myalerts += $alert
}
}
### now we have alerts for this site, we can delete them
foreach ($alertdel in $myalerts)
{
$alerts.Delete($alertdel.ID)
write-host $alertdel.ID
}
}
}
}
Source