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

Another user (Charlie) is requesting to have alerts sent anytime a change is made on the "discussion board", "Batch Report" folder, "Reports" folder, and "Audits" folder within a single client site. There are 50 client sites with each of these folders.

My question is, instead of manually setting up alerts on 50 sites x 4 folders = 200 alerts, is there so sort of PowerShell script that can be run to potentially automate this task?

share|improve this question
    
sharepointdiary.com/2011/11/… –  BlueBird Mar 25 '13 at 19:09
    
@BlueBird, please re-post your response as an answer. also when you re-post please include the answer in full along with the link. Links have a tendency to disappear with time and this keeps the answers relevant. –  Jesus Shelby Mar 25 '13 at 19:46
    
Thanks BlueBird! –  sharepointaaron Mar 26 '13 at 13:45

1 Answer 1

Here is a basic outline of creating an alert using powershell. Combine this with some powershell that iterates through the sites / lists you are hoping to target and you have yourself a good start.

$SPsite = Get-SPSite "http://SharePointSite.com"
$SPweb=$SPsite.Rootweb 
$SPlist=$SPweb.lists["Shared documents"] 
$SPuser = $SPweb.EnsureUser('Domain\Salaudeen') 
$SPnewAlert = $SPuser.Alerts.Add() 
$SPnewAlert.Title = "My Custom Alert"
$SPnewAlert.AlertType=[Microsoft.SharePoint.SPAlertType]::List 
$SPnewAlert.List = $SPlist
$SPnewAlert.DeliveryChannels = [Microsoft.SharePoint.SPAlertDeliveryChannels]::Email 
$SPnewAlert.EventType = [Microsoft.SharePoint.SPEventType]::Add 
$SPnewAlert.AlertFrequency = [Microsoft.SharePoint.SPAlertFrequency]::Immediate 
$SPnewAlert.Update() 
$SPweb.Dispose() 
$SPSite.Dispose() 

Read more: http://www.sharepointdiary.com/2011/11/managing-alerts-using-powershell.html#ixzz2OaCHGyYf

share|improve this answer

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.