Solved

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

Posted on 2014-10-28
2
450 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

For SharePoint sites, particularly public-facing ones, there are times when adding JavaScript, Meta Tags, CSS Styles or other content to the page <head> section is more practical than modifying master pages.  For instance, you could add the jQuery l…
SharePoint Designer 2010 has tools and commands to do everything that can be done with web parts in the browser, and then some – except uploading a web part straight into a page that is edited in SPD. So, can it be done? Scenario For a recent pr…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

786 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