• Sign In
 
  • MSDN Blogs
  • Microsoft Blog Images
  • More ...

  • Advanced search options...
  • Blog Home
  • About
  • Email Blog Author
  • Share this
  • RSS for posts
  • Atom
  • RSS for comments
  • CDO (20)
  • Code Snippet (42)
  • Custom Providers (15)
  • Debugging (7)
  • DevMsgTeam (268)
  • Documentation (96)
  • DST (8)
  • EWS (7)
  • Exchange (98)
  • Gotchas (89)
  • Hotfix (26)
  • MAPI (212)
  • MAPI Download (47)
  • MFCMAPI (87)
  • MSDN (49)
  • Non Dev (11)
  • OOM (17)
  • Outlook (154)
  • Outlook 2007 Auxiliary Reference (44)
  • Outlook Integration API (11)
  • Protocol Docs (20)
  • PST/OST (21)
  • Public Folders (3)
  • Vista (12)
  • WrapPST (14)
Links:
  • Download MFCMAPI
  • MFCMAPI on Facebook
  • Troubleshooting Outlook Crashes
  • Office Update Center
  • Developer Messaging Team Blog
This site is provided "AS IS" with no warranties, and confers no rights. Use of included code samples are subject to the terms specified in the Terms of Use.
Archives
  • January 2012 (1)
  • December 2011 (3)
  • November 2011 (1)
  • October 2011 (3)
  • September 2011 (1)
  • August 2011 (1)
  • July 2011 (4)
  • June 2011 (3)
  • May 2011 (3)
  • April 2011 (3)
  • March 2011 (5)
  • February 2011 (1)
  • January 2011 (2)
  • December 2010 (1)
  • November 2010 (4)
  • October 2010 (1)
  • September 2010 (3)
  • August 2010 (5)
  • July 2010 (3)
  • June 2010 (3)
  • May 2010 (1)
  • April 2010 (3)
  • March 2010 (3)
  • February 2010 (3)
  • January 2010 (2)
  • December 2009 (3)
  • November 2009 (5)
  • October 2009 (4)
  • September 2009 (5)
  • August 2009 (5)
  • July 2009 (11)
  • June 2009 (6)
  • May 2009 (5)
  • April 2009 (3)
  • March 2009 (18)
  • February 2009 (10)
  • January 2009 (3)
  • December 2008 (2)
  • November 2008 (2)
  • October 2008 (5)
  • September 2008 (4)
  • August 2008 (10)
  • July 2008 (6)
  • June 2008 (8)
  • May 2008 (2)
  • April 2008 (4)
  • March 2008 (2)
  • February 2008 (2)
  • January 2008 (5)
  • December 2007 (3)
  • November 2007 (2)
  • October 2007 (3)
  • September 2007 (1)
  • August 2007 (4)
  • July 2007 (5)
  • June 2007 (3)
  • May 2007 (4)
  • April 2007 (1)
  • March 2007 (6)
  • February 2007 (3)
  • January 2007 (2)
  • December 2006 (4)
  • November 2006 (3)
  • October 2006 (1)
  • August 2006 (1)
  • June 2006 (5)
  • May 2006 (5)
  • December 2005 (1)
  • November 2005 (4)
  • October 2005 (2)
  • September 2005 (1)
  • April 2005 (3)
  • December 2004 (2)
  • September 2004 (2)
  • August 2004 (3)
  • July 2004 (3)

Poof Your Calendar - Really!

MSDN Blogs > SGriffin's MAPI Internals > Poof Your Calendar - Really!

Poof Your Calendar - Really!

Rate This
Stephen Griffin - MSFT
21 Feb 2007 11:40 AM
  • Comments 54

Whenever someone shows me a Calendar folder where OWA and Outlook have different ideas of when recurring meetings are, I always ask if they've tried to poof the calendar. This always generates a chuckle, even though I was dead serious.

OWA doesn't know anything about expanding recurring meetings and appointments. Instead, it relies on a task which runs in Exchange that expands the recurring items for it. Under certain scenarios, Exchange may not realize that a recurring item has changed and needs expansion again. Sometimes this is because of a bug, sometimes it's because of corrupted data. Sometimes a little of both.

Anyway, the process for fixing this is called Poof. I think the name stems from the expression "Poof! Be gone!". When a Poof is performed on a calendar, Exchange deletes all of the cached expansions and performs them again.

Poof is enabled by first setting the following registry value on the Exchange server

Key:           HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\EXCDO\Parameters
Value (DWORD): CalendarRecovery
Data:          1

Next, in the description field of the properties of the Calendar folder, set the following text:

CleanupExpansionCachesInTheCalendarFolder

This signals Exchange to perform the Poof for this Calendar.

I haven't posted a MAPI sample in a while, so I whipped one together to demonstrate how one could Poof a set of Calendars:

http://stephengriffin.members.winisp.net/PowerPoof/PowerPoof.zip

As usual, all caveats and disclaimers for samples apply. One big caveat here - Poof is an expensive process. Running Poof against every mailbox in a server in a short period of time could place a heavy load on the server. So - if this is something you want to do, I'd recommend doing the Poof in batches, like so (assume legdns.txt contains a list of legacy DNs for mailboxes you wish to Poof):

for /F "delims=" %i in (legdns.txt) do @PowerPoof -p "Default Outlook Profile" -m "%i" -v

Note also that if you put this in a batch file, you'd need to use %%i instead of %i.

Update:

One of my colleagues pointed out why Poof sometimes won't work - if you're using a cached mode profile, when you write the text to the Calendar folder, nothing is changed on the server until the client syncs with the server. And even then it's unclear whether that would actually trigger the Poof. So - if you are performing Poof manually, make sure the Outlook profile you use isn't cached.

If you're using PowerPoof with the -m or -s switches, the connection made to the mailbox is uncached regardless of the profile type, so this won't be an issue. If you're using PowerPoof with -p and no other parameters, then it will make the setting on the calendar folder of whatever profile you specified, so if that profile is cached it's likely the Poof won't happen.

Also - another issue I've seen frequently with PowerPoof. If you run it with the legdns.txt file, make sure the DNs listed in legdns.txt do not have extra spaces at the beginning or ending of the line. If they do, those spaces will passed in with the -m switch and PowerPoof won't be able to find the mailbox.

  • 54 Comments
Exchange, Outlook, DST, Code Snippet, Gotchas, DevMsgTeam
Comments
  • Craig
    26 Feb 2007 1:35 PM

    If you're creating the CalendarRecovery registry value manually:

    - it is a DWORD data type

    - if the \EXCDO and/or \Parameters keys don't exist you should manually create them.

  • blake
    7 Mar 2007 10:59 AM

    Do we make this registry change on the backend servers or the frontend servers or both?

    will your app make this registry change for us?

    all our owa users' dst appointments are off by an hour after installing all the appropriate patches in the right order.

    I also ran powerpoof on my profile and it doesn't seem to be updating my calendar when I view it in OWA.

    Thanks!

  • Stephen Griffin - MSFT
    7 Mar 2007 11:23 AM

    The registry key needs to be written on the mailbox servers. The sample application does not write the registry key - it only writes the string to the Calendar folder.

    Perhaps you hadn't set the registry key properly on the server? Try doing the POOF manually - the sample is really better for doing a batch of mailboxes than for doing a single one.

  • Courtney
    7 Mar 2007 12:28 PM

    Stephen, Thanks for all you do! I need to know the last step in the manual process. After I create the registry keys on the exchange server on which my mailbox resides, then add the description to my calendar properties, then do I just open Outlook? Do I run something? When will it finish poofing my calendar?

    Thanks so much! Courtney

  • Stephen Griffin - MSFT
    7 Mar 2007 12:37 PM

    Setting the description in the Calendar is the last step. Exchange spots this change and kicks off the task of reexpansion right then. Depending on the load on the server, the reexpansion should be done in just minute or two (if even that long).

  • Theresa
    7 Mar 2007 1:39 PM

    Hi Stephen, thanks for this. I have issues with the sample script. I ran it against a bunch of mailboxes, it didn't set the text on the discription fields of their calendars. help...

  • Stephen Griffin - MSFT
    7 Mar 2007 1:54 PM

    After powerpoof sets the string, it then restores whatever was originally there. So don't expect to see the string in there when you look. If you want detailed output on what the tool did, use the -v switch. If it didn't report any errors, then it did it's part for triggering the poof.

    If it did report errors, you can report them back here.

  • Shawn
    7 Mar 2007 3:53 PM

    Does PowerPoof remove the string from the Calendar Description once it's finished "poofing"? (I can't believe I'm using the word 'poof')

    I have run PowerPoof several times, and once finished, I do not see the CleanupExpansionCachesInTheCalendarFolder string in the Calendar description.

  • Stephen Griffin - MSFT
    7 Mar 2007 4:01 PM

    yep - see previous comment (or glance over the code if you're dev inclined!)

  • Theresa Ebagua
    7 Mar 2007 4:27 PM

    The script worked. Thanks Stephen. You are awesome.

  • Rakesh
    7 Mar 2007 5:13 PM

    We added registry Key on server which has users mailbox

    Added CleanupExpansionCachesInTheCalendarFolder for couple of users from outlook , unfortunately it didnt worked in my case.

    Is there any logging i can turn on which will actually say that cache is deleted

  • Stephen Griffin - MSFT
    7 Mar 2007 5:31 PM

    It's quite possible the issue you're seeing isn't actually the issue described in the post.

    Try going to one of the items in OWA that you think isn't rendering right and change the subject. Doing this from OWA will force re-expansion for the item. If that doesn't fix the problem for this item, then you're not seeing a problem that Poof would address.

    If you want to verify the reg key is being read on the server, use regmon with a filter of "CalendarRecovery". The key should be read any time you set CleanupExpansionCachesInTheCalendarFolder on a calendar folder.

    If you don't see the reg key being read, then it's possible ExCDO isn't starting on your Exchange server (which is a much bigger problem) - check the event logs for related errors.

  • jlathem
    8 Mar 2007 12:01 PM

    Does this work for calendars stored in public folders, too?  Or is it just for the calendar in the user's Inbox?  If not, is there a similar way to force a Poof of a public folder calendar?  Thanks!

  • Stephen Griffin - MSFT
    8 Mar 2007 12:12 PM

    The Poof process should work on public folder calendars, but you'll need to do those manually. The caveat about cached mode applies if the PF calendar is cached.

    The sample I wrote doesn't hit public folders, but you're welcome to write your own. :)

  • Serhat
    9 Mar 2007 11:42 AM

    Hi There

    I am running the PowerPoof script. But I still have some users complaining about their calendar being off by one hour. Mostly PDA users with intelli sync. Can you help me or let me know what i am doing wrong. I have followed your instructions to the dot from above.

    Thanks again,

    Serhat

Page 1 of 4 (54 items) 1234
Leave a Comment
  • Please add 8 and 2 and type the answer here:
  • Post
  • © 2012 Microsoft Corporation.
  • Terms of Use
  • Trademarks
  • Privacy Statement
  • Report Abuse
  • 5.6.1214.118