Quantcast
Channel: PowerShell – CHUVASH.eu
Viewing all articles
Browse latest Browse all 20

Showing Birthdays and Job Anniversaries in the Newsfeed

$
0
0

anniversary-001

In our project we have a requirement to show birthdays and job anniversaries in the Newsfeed. The solution is simple (when you know it) but there has not been any information about it online, until today. I want to share a few lines of PowerShell code to enable Anniversary notifications in the Newsfeed. This desired piece of code was written by my colleague Emma Degerman. Enjoy:

$job = Get-SPTimerJob | ? { $_.TypeName -like "*.UserProfileChangeJob" }
$job.GenerateAnniversaries = $true
$job.Schedule = [Microsoft.SharePoint.SPSchedule]::FromString("hourly between 55 and 55")
$job.Update()

The code retrieves the Timer Job that changes User Profiles, sets “GenerateAnniversaries” to true, then it updates the schedule to run it before the Activity Feed Timer Job and updates it. By the way, it is only applicable for SharePoint On Premises.

This is it, a quick tip for a great Intranet.



Viewing all articles
Browse latest Browse all 20

Trending Articles