Welcome to MSDN Blogs Sign in | Join | Help

Poof Your Calendar - Really!

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.

Published Wednesday, February 21, 2007 11:40 AM by Stephen Griffin

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: Poof Your Calendar - Really!

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.

Monday, February 26, 2007 1:35 PM by Craig

# re: Poof Your Calendar - Really!

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!

Wednesday, March 07, 2007 10:59 AM by blake

# re: Poof Your Calendar - Really!

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.

Wednesday, March 07, 2007 11:23 AM by Stephen Griffin

# re: Poof Your Calendar - Really!

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

Wednesday, March 07, 2007 12:28 PM by Courtney

# re: Poof Your Calendar - Really!

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).

Wednesday, March 07, 2007 12:37 PM by Stephen Griffin

# re: Poof Your Calendar - Really!

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...

Wednesday, March 07, 2007 1:39 PM by Theresa

# re: Poof Your Calendar - Really!

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.

Wednesday, March 07, 2007 1:54 PM by Stephen Griffin

# re: Poof Your Calendar - Really!

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.

Wednesday, March 07, 2007 3:53 PM by Shawn

# re: Poof Your Calendar - Really!

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

Wednesday, March 07, 2007 4:01 PM by Stephen Griffin

# re: Poof Your Calendar - Really!

The script worked. Thanks Stephen. You are awesome.

Wednesday, March 07, 2007 4:27 PM by Theresa Ebagua

# re: Poof Your Calendar - Really!

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

Wednesday, March 07, 2007 5:13 PM by Rakesh

# re: Poof Your Calendar - Really!

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.

Wednesday, March 07, 2007 5:31 PM by Stephen Griffin

# re: Poof Your Calendar - Really!

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!

Thursday, March 08, 2007 12:01 PM by jlathem

# re: Poof Your Calendar - Really!

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. :)

Thursday, March 08, 2007 12:12 PM by Stephen Griffin

# re: Poof Your Calendar - Really!

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

Friday, March 09, 2007 11:42 AM by Serhat

# re: Poof Your Calendar - Really!

Poof would only address instances where OWA and Outlook render the same recurring meeting differently. If the meeting is wrong in both Outlook and OWA, Poof won't fix it.

Friday, March 09, 2007 11:56 AM by Stephen Griffin

# re: Poof Your Calendar - Really!

Hi, we are unable to poof public folder calendars even though we configure in online mode. Please help!

Friday, March 09, 2007 4:27 PM by Srini

# re: Poof Your Calendar - Really!

Stephen...

 I'm running PowerPoof : >powerpoof -P Outlook -S server > c:\Poof.txt ..

 Is this tool just opening the calendar and put the syntax in the description field, then reading the reg key?

Thanks

Monday, March 12, 2007 4:30 PM by Dennis

# re: Poof Your Calendar - Really!

It just puts the string in the calendar description. Exchange is monitoring for the string to be written. When it sees it, it checks the reg key to see that Poof is actually enabled, then performs the Poof if it is.

My sample does not read or write the reg key - it has to be written manually to the Exchange server.

Monday, March 12, 2007 4:55 PM by Stephen Griffin

# re: Poof Your Calendar - Really!

Sweet... just sweet! Works like a charm! You-the-man!

Tuesday, March 13, 2007 12:19 PM by Efrain

# re: Poof Your Calendar - Really!

Stephen Griffin...

  Thanks!! PowerPoof worked perfectly!!!

Dennis-

Tuesday, March 13, 2007 12:51 PM by Dennis

# re: Poof Your Calendar - Really!

Stephen,

I went into the registry but can't find the EXCDO. We are running on exchange 2003 enterprise SP2. Thanks

Tuesday, March 13, 2007 1:45 PM by Tom

# re: Poof Your Calendar - Really!

The poofing fixed entries that were off, but it created duplicate entries for all recurring appointments.  Dupes are not visable through Outlook, only OWA.  Please help!

Wednesday, March 14, 2007 10:59 AM by Kevin

# re: Poof Your Calendar - Really!

Kevin - you might try the Poof again. I've not seen that happen before.

Tom - you need to create the key. Craig pointed that out earlier.

Wednesday, March 14, 2007 11:04 AM by Stephen Griffin

# re: Poof Your Calendar - Really!

Stephen,

Thank-you for this tool!!  Can you elaborate on how to fix Public Folders.  I am not sure what you mean by "do it manually".

Thanks

Wednesday, March 14, 2007 3:13 PM by Joe

# re: Poof Your Calendar - Really!

You'll have to set CleanupExpansionCachesInTheCalendarFolder on the description of the Public Folder calendar folder using Outlook. The sample does not operate on Public Folders.

Wednesday, March 14, 2007 3:23 PM by Stephen Griffin

# re: Poof Your Calendar - Really!

ok...I'm a little confused.

I did the reg key...but am unsure where to do this

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

CleanupExpansionCachesInTheCalendarFolder

I thought I did it througgh outlook, but it's not working...what am I missing?

Is there anothe rplace to set this text?

thanks!

Wednesday, March 14, 2007 3:32 PM by Jennifer

# re: Poof Your Calendar - Really!

Assuming you're not running into the cached mode issue I identified above, it's possible whatever issue you're experiencing with the Public Folder calendar isn't the issue described in the blog.

Wednesday, March 14, 2007 3:39 PM by Stephen Griffin

# re: Poof Your Calendar - Really!

*doh*

never mind...I was putting the reg key in the wrong place

Thursday, March 15, 2007 9:49 AM by Jennifeer

# re: Poof Your Calendar - Really!

can someone give me an example of what legdns.txt should look like?  I'd really appreciate it.

Thursday, March 15, 2007 1:32 PM by Jennifer

# re: Poof Your Calendar - Really!

Getting an error running powerpoof with the -P ans -S switch

It seems it can't locate the calendar for all the mailboxes.  Any ideas?

INFO: 0x8004010F - ProcessMailbox failed to locate Calendar

Friday, March 16, 2007 1:30 AM by john

# re: Poof Your Calendar - Really!

I guess it is a permissions issue.  What permissions does the user account need?  Full permissions to all the mailboxes?

Friday, March 16, 2007 1:35 AM by john

# re: Poof Your Calendar - Really!

so I've got the script worked out a bit, but quick question

I'm trying to verify that the script is working by look into the properties of the calendar in question (in this case, mine)

But I do't see the string there.  Does it happen so quickly that I won't...or does this mean the script is not working?

Friday, March 16, 2007 12:47 PM by Jennifer

# re: Poof Your Calendar - Really!

We have a user that has all of her calendar appointments off by several hours.  I mean these appointments are well after the 3 week time period.  They were thrown off after TXMove was ran.  Do you have a fix for this?

Tuesday, March 20, 2007 2:39 PM by aaron

# re: Poof Your Calendar - Really!

I created a couple of PowerShell scripts that actively monitor for 8230 events on remote servers and execute PowerPoof against the suspect mailboxes.

The corrupt calendar item issue had been creating some havoc just after migrating all of our mailboxes to the 2007 servers. disk utilization and transaction log creation would spike and actually crippled our server once (I'm not sure because we have another issue that is causing denied connections). :(

Anyway, try the code if you like. The links are on my blog.

skyh00k

Tuesday, September 18, 2007 10:56 PM by skyh00k

# re: Poof Your Calendar - Really!

Stephen,

I created the regedit keys and value on the server manually. When I try to add the CleanupExpansionCachesInTheCalendarFolder in the Description field of the Calendar Properties for the user and hit Apply I get an "Unknown Error" box. Any ideas?

Tuesday, October 28, 2008 11:11 AM by tjbruins

# re: Poof Your Calendar - Really!

Interesting - you should look on the Exchange server and see if any events were written in the Application log when you did that.

Tuesday, October 28, 2008 12:03 PM by Stephen Griffin

# re: Poof Your Calendar - Really!

There are many EXCDO Error Event ID 8209 & 8201

Calendaring agent failed with error code 0x8000ffff while cleaning up the calendar.

Tuesday, October 28, 2008 1:33 PM by tjbruins

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker