Solved

Subscribe "Alert" all users to a particular discussion board list

Posted on 2014-10-28
2
446 Views
Last Modified: 2014-10-29
Dear all.

We currently have an all staff email address in which are looking to replace with discussion boards.

Problem is every user would have to subscribe manually.

Is there a method in PowerShell or similar that I may subscribe all users to a particular list?

Thanks for reading.
0
Comment
Question by:Michael Arthey
2 Comments
 
LVL 19

Accepted Solution

by:
Montoya earned 250 total points
ID: 40409157
you can subscribe all users that you want, as long as you have rights. When you create an alert, it shows you a box to input email addresses or groups.. but a DL in there and you're set.
0
 
LVL 8

Assisted Solution

by:Jayaraja Jayaraman
Jayaraja Jayaraman earned 250 total points
ID: 40409271
try the below


get all web users:
function GetSPWebUsers($SiteCollectionURL)
{
    [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") > $null
    $site = new-object Microsoft.SharePoint.SPSite($SiteCollectionURL)
    $web = $site.openweb()
    $siteUsers = $web.SiteUsers
 
    foreach($user in $siteUsers)
    {        
        Write-Host " ------------------------------------- " 
        Write-Host "Site Collection URL:", $SiteCollectionURL
        if($user.IsSiteAdmin -eq $true)
        {
            Write-Host "ADMIN: ", $user.LoginName
$list=$web.Lists.TryGetList("Shared Documents")
$user = $web.EnsureUser($user.LoginName )
$newAlert = $user.Alerts.Add()
$newAlert.Title = "My Custom Alert"
$newAlert.AlertType=[Microsoft.SharePoint.SPAlertType]::List
$newAlert.List = $list
$newAlert.DeliveryChannels = [Microsoft.SharePoint.SPAlertDeliveryChannels]::Email
$newAlert.EventType = [Microsoft.SharePoint.SPEventType]::Add
$newAlert.AlertFrequency = [Microsoft.SharePoint.SPAlertFrequency]::Immediate
$newAlert.Update()
        }
        else
        {
            Write-Host "USER: ", $user.LoginName
$list=$web.Lists.TryGetList("Shared Documents")
$user = $web.EnsureUser($user.LoginName )
$newAlert = $user.Alerts.Add()
$newAlert.Title = "My Custom Alert"
$newAlert.AlertType=[Microsoft.SharePoint.SPAlertType]::List
$newAlert.List = $list
$newAlert.DeliveryChannels = [Microsoft.SharePoint.SPAlertDeliveryChannels]::Email
$newAlert.EventType = [Microsoft.SharePoint.SPEventType]::Add
$newAlert.AlertFrequency = [Microsoft.SharePoint.SPAlertFrequency]::Immediate
$newAlert.Update()
        }
        Write-Host " ------------------------------------- " 
    }    
    $web.Dispose()
    $site.Dispose()
}
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The vision: A MegaMenu for a SharePoint portal home page The mission: Make it easy to maintain. Allow rich content and sub headers as well as standard links. Factor in frequent changes without involving developers or a lengthy Dev/Test/Prod rel…
We had a requirement to extract data from a SharePoint 2010 Customer List into a CSV file and then place the CSV file into a directory on the network so that the file could be consumed by an AS400 system. I will share in Part 1 how to Extract the Da…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now