Solved

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

Posted on 2014-10-28
2
462 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

If you create your solutions on SharePoint sooner or later you will come upon a request to set  permissions of the item depending on some of the item's meta-data - the author, people assigned as approvers, divisions, categories etc. The most natu…
When using a search centre, I'm going to show you how to configure Sharepoint's search to only return results from the current site collection. Very useful when using Office 365 with multiple site collections.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

739 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