I understand alerts will only be show to those who created them.
However I am on a test site and would like to rid the list of all alerts.
Is there a way to do this programatically.
I can seem to list them out using the following script:(See below error)
When I tried including a $web.Alerts.Delete() in the for block it throws me an error
(Cannot find an overload for "Delete" and the argument count: At C:\Users\spfarm\desktop\Alerts.ps1:14 char:19 + $web.Alerts.Delete <<<< (); + CategoryInfo : NotSpecified: (:) [], MethodEx + FullyQualifiedErrorId : MethodCountCouldNotFindBest)
$web = Get-SPWeb "http://SharepointTest:2000/"
$listurl = "http://sharepointTest:2000/Lists/Announcements/"
foreach($alert in $web.Alerts)
{
#if($alert.ListUrl -eq $ListUrl)
#{
"User - " + $alert.User.Name
"Title - " + $alert.Title
"Frequency - " + $alert.AlertFrequency
"Delivery Via - " + $alert.DeliveryChannels
"Change Type - " + $alert.eventtype
Write-Host "_____________________"
#}
}