Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a list and I would like to set an alert for "Item created by me is modified".

I would like to, by default, have set this alert for every user in the company.

I know I can create a workflow that runs on when an item is edited, but I would prefer to use the out of the box alerts if possible.

Is there a clean easy global way to do this?

Do I need to set an event reciever for item added and set an alert on the item level?

share|improve this question
add comment

1 Answer

taken from http://secretsofsharepoint.com/cs/forums/t/2201.aspx

$web = Get-SPWeb "http://intranet.sharepoint.com"
$group = $web.Groups["Intranet Members"]
$list = $web.Lists["Shared Documents"]
foreach ($user in $group.Users){
     $alert = $user.Alerts.Add()
     $alert.Title = "My Alert"
     $alert.AlertType = [Microsoft.SharePoint.SPAlertType]::List
     $alert.List = $list
     $alert.DeliveryChannels = [Microsoft.SharePoint.SPAlertDeliveryChannels]::Email
     $alert.EventType = [Microsoft.SharePoint.SPEventType]::Add
     $alert.AlertFrequency = [Microsoft.SharePoint.SPAlertFrequency]::Immediate
     $alert.Update()
}
$web.Dispose()
share|improve this answer
1  
Is there a way to have this maintainable for future users getting added to the site? –  Brandon Jun 29 '12 at 17:09
    
You may create a dummy user which has his email set to a distribution group for all users and add the alert to this user. –  Per Jakobsen Jul 4 '12 at 18:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.