SP2010: DST issue with alerts

Each time Europe passes the DST dates and goes from summertime to wintertime (as we call it), weird things happen with software. Although you might think they should have this thing down by now, it just keeps on being an issue and causing problems. This year, one of our users reported scheduled alerts not being sent on the time he wanted them to. Alerts set to be sent at 17:00 were now being sent at 16:00 instead.

There’s not so much you can do yourself. Of course you should check the time settings on the server. You should also check if the date/time settings of your site are set properly, but they probably are. I checked all that and was still puzzled, no wrong settings so nothing I could do.

I then contacted Microsoft partner support and was helped out by one of the support engineers. She pointed me to a script which is supposed to fix alert issues. It’s a powershell script you can run per site to correct any faults there might be. Take the following steps to do so:

  1. At the directory C:\, create a folder named Test.
  2. Copy the code from the Script Center (http://go.microsoft.com/fwlink/p/?LinkId=196687), and then paste it into a text editor, such as Notepad.
  3. Save the file, naming it Invoke-AlertFixup.ps1 at theTest folder.
  4. On the Start menu, click All Programs.
  5. Click Microsoft SharePoint 2010 Products.
  6. Right click SharePoint 2010 Management Shell, run as administrator.
  7. Type: cd C:\Test Type Enter.
  8. At the Windows PowerShell command prompt, type the following (note: there is a whitespace between the two dots):
    ../Invoke-AlertFixup.ps1
  9. Type Enter. Then type: cd ../. Type Enter.
  10. Then use the command to update the alerts:
    Invoke-AlertFixup -site <NewURL> -oldurl <OldURL>

This above bit is copy/paste from the support site, so no credits for me other than my absurd copy/paste skills. If you want to run this on a webapplication with multiple sitecollections, use this approach instead of step 10:

$site = Get-SPSite http://urlofyoursite
$site.WebApplication.Sites | foreach { Invoke-AlertFixup -site $_.Url -oldsite $_.Url }

Note: I’ve done some quick checks which seem to work ok, but I have to wait on confirmation of my user that previous alerts are fixed al well.

Leave a Reply

Your email address will not be published. Required fields are marked *