Create SharePoint Alert for a Group

SharePoint doesn’t provide a direct way to create alerts for groups. Alerts are always targeted to individual user accounts in SharePoint. If you have a requirement to create alerts for a group of people, create an E-mail enabled AD security group and add an alert to it from SharePoint.

sharepoint create group alert

Set alert to a group in SharePoint using PowerShell:

Alternatively, You can use PowerShell to create a SharePoint alert for a group.

Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Variables to create group alert
$WebURL="https://intranet.crescent.com/sites/sales/" 
$GroupName="Sales Auditors"
$ListName="Documents"

#Get the objects
$Web = Get-SPWeb $WebURL
$Group = $web.Groups[$GroupName]
$List = $web.Lists[$ListName]

#Loop throgh each user in the group and create new alert
foreach ($user in $group.Users)
{
     #sharepoint set alert to group
     $alert = $user.Alerts.Add()
     $alert.Title = "New Sales Proposal 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()
}
Write-host "Alerts created for all users in the group:"$GroupName
$web.Dispose()

Related Post: Managing Alerts in SharePoint using PowerShell

Salaudeen Rajack

Salaudeen Rajack - SharePoint Expert with Two decades of SharePoint Experience. Love to Share my knowledge and experience with the SharePoint community, through real-time articles!

Leave a Reply

Your email address will not be published. Required fields are marked *