How to get a list of alerts on MOSS 07
-
29-09-2020 - |
سؤال
I need help getting a list of alerts on a MOSS 07 server.
I'm trying to use STSADM.
I saw the getproperty command for STSADM so I tried.
STSADM -o getproperty -pv alerts-enabled -url http://intranet/
All it did was throw an error.
so it tried
STSADM -o getproperty -url http://intranet/
And found a list of property values.
I'm not sure what I should do to get a list of current alerts in the site collection.
المحلول
You can use the pwoershell to get the alerts for a site collection.
- First you make sure powershell is properly configured.
Now run the below script and you will get it.
Add-PSSnapin microsoft.sharepoint.powershell
$site = Get-SPSite "http://dlvrn2010.com/sites/spalerts/ $alertResultsCollection = @() foreach ($web in $site.AllWebs) { foreach ($alert in $web.Alerts){ $alertURL = $web.URL + "/" + $alert.ListUrl $alertResult = New-Object PSObject $alertResult | Add-Member -type NoteProperty -name "List URL" -value $alertURL $alertResult | Add-Member -type NoteProperty -name "Alert Title" -value alert.Title $alertResult | Add-Member -type NoteProperty -name "Alert Type" -value $alert.AlertType $alertResult | Add-Member -type NoteProperty -name "Subscribed User" -value $alert.User $alertResultsCollection += $alertResult } } $site.Dispose() $alertResultsCollection
Export to CSV
$alertResultsCollection | Export-CSV "Alerts.csv"
you can use the script from this [codeplex solution][3]
also check this User on SharePoint 2007 getting alert that was/is not set up