Solved

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

Posted on 2014-10-28
2
440 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:
Iammontoya earned 250 total points
Comment Utility
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
Comment Utility
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.

Join & Write a Comment

The Scenario: Let’s say you have a quote worksheet in Excel that you use to work up sales figures and such for your clients. You utilize SharePoint to manage and keep track of these documents. You would like values from your worksheet to populate Sh…
Summary In SharePoint 2010 it is easy to create custom color themes to jazz up a site. Theme colors can also be created in PowerPoint 2010 with a few clicks. But how do the chosen colors actually look in the SharePoint site? The attached PowerPoint…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

772 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

11 Experts available now in Live!

Get 1:1 Help Now