Welcome to Exchange Team Blog Sign in | Join | Help

Syndication

This Blog

How to find public folder calendars and their owners?

With the new DST changes, many customers are asking about how to identify all their public folder calendars and their owners. Fortunately, this is very easy to do using PFDAVAdmin. When you create a folder that holds appointment items, this sets the PR_CONTAINER_CLASS (0x3613001E) property on the folder to IPF.Appointment, and there are several ways to use this property in PFDAVAdmin. There are several ways in which you can go about this that I will cover here.

Before you begin, connect as normal in PFDAVAdmin. Also, go to Tools > Options and make sure logging is enabled.

The first and easiest way to do this is to use Export Properties. Here are the steps:

  • Go to Tools > Export Properties.
  • Leave the scope set to "All Public Folders", and select an output file.
  • In "Properties To Export", check the box for PR_CONTAINER_CLASS. You can uncheck the other stuff that's checked by default, or leave them checked, it doesn't really matter.
  • Click OK and the export will begin.

When this completes you'll have a tab-delimited file containing properties for every folder in the hierarchy. You can open this file in Excel and sort by the PR_CONTAINER_CLASS column to identify all IPF.Appointment folders.

A more complicated way to accomplish this is to use Custom Bulk Operation. With this method, you can choose to only do the folders that meet your criteria, instead of doing every folder in the hierarchy. Use the following steps.

  • Go to Tools > Custom Bulk Operation.
  • Under "Specify the base folder", set it to "Public Folders".
  • In the "Overall Filter" box, enter "(&(0x3613001E=IPF.Appointment))".
  • Click the Add button, choose "Other folder properties", and click OK.
  • Choose "Export", select an export file.
  • In the Property dropdown, choose PR_CONTAINER_CLASS and hit Add.
  • Choose whatever other properties you want to export and add those too. Then click OK.
  • Now you should be back on the Custom Bulk Operation window. Click OK to begin the export.

This will export properties only for calendar folders.

You can also use Tools > Export Permissions to export the permissions for all the folders and see who the owners are. It's not too hard to write a PowerShell script that will go through the property export, identify any IPF.Appointment folders, and then look up the owners in the permissions export. This post includes an example script that will do just that (see below at the attachment at the end of this post). Note that you don't need Exchange 2007 to use this script - just install PowerShell on a workstation somewhere, rename to .ps1 and run.

But there's one other way to go about this. You can use a custom permissions export to only export permissions for any folders that are IPF.Appointment folders. This doesn't export any other properties - only the permissions - but since the export only contains the folders you're concerned with, you don't need the other properties.

Here are the steps:

  • Go to Tools > Custom Bulk Operation.
  • Under "Specify the base folder", set it to "Public Folders".
  • In the "Overall Filter" box, enter "(&(0x3613001E=IPF.Appointment))".
  • Click the Add button, choose "Folder Permissions", and click OK.
  • Choose "Export" and select your export file.
  • Choose either legacyExchangeDN or Account Name format, and click OK.
  • Now you should be back on the Custom Bulk Operation window. Click OK to begin the export.

The resulting file will be a permissions export only for folders where the PR_CONTAINER_CLASS is IPF.Appointment. Then you can just glance through the script to see who the owners of all these folders are. Note that a non-contact owner will just be "Owner", whereas an owner who is also a folder contact will be "All".

Hope this helps!

- Bill Long

Published Friday, February 16, 2007 11:24 AM by Exchange
Filed Under: , , ,
Attachment(s): Get-PFOwnersForCalendars.txt

Comments

 

Jeejo Pallayi said:

When it comes to updating the PF calendar with DST patches, (after finding the owner) what would be an appropriate path considering the way the MSEXTMZ tools work?
February 16, 2007 3:22 PM
 

Bill Long said:

Let me preface this by saying that I'm the PFDAVAdmin expert, but I'm not the DST expert. That said...

My current understanding is that the owner of the folder must run the tool against the folders they own. However, the tool will only update appointments for which that user is the organizer. That means if you have a folder where a bunch of different people can create appointments, each of those users would have to run the tool, and they won't all necessarily be owners... they could have other roles. So depending on your situation, just knowing the owner might not be enough.

The easiest way to approach this is probably to have the owner of each folder responsible for running the tool and manually updating any items that the tool won't affect. Or possibly have the owner identify any users that created appointments during the new DST range and have those users all run it against the folder.

So that's my understanding of the current approach to this. Hopefully someone will correct me if I'm way off here.  :-)
February 16, 2007 3:47 PM
 

Anonymous said:

I think that when you run the Outlook Update Tool against a public folder, you only need to be an owner of the folder to update appointments, regardless of who the organizer is.  After testing this, it seemed to be the case.  I also discovered that if you have appointments in a public folder that contain attendees, the Outlook Update Tool will not recognize these appointments.  Other than that, the appointments should update just fine.
February 16, 2007 4:04 PM
 

Jeremy Green said:

Any other ways of granting a user Full Mailbox Access and Send As rights to all mailboxes besides the VB script provided by Microsoft and then later retract those rights?
February 17, 2007 12:52 AM
 

John said:

Powershell script fails with "not recognized as cmdlet ......
February 17, 2007 1:53 PM
 

Bill Long said:

Jeremy, there's no other supported tool I'm aware of.

John, if you don't place the script somewhere in the path, you'll need to change in the folder where the script is and precede the script name with .\. You may also need to change your execution policy. I just copied it to my desktop on my home machine and here's what this looks like for me:

PS C:\Users\bill> cd desktop
PS C:\Users\bill\Desktop> .\Get-PFOwnersForCalendars
File C:\Users\bill\Desktop\Get-PFOwnersForCalendars.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see "get-help about_signing" for more details.
At line:1 char:26
+ .\Get-PFOwnersForCalendars <<<<
PS C:\users\bill\Desktop> set-executionpolicy unrestricted
PS C:\users\bill\Desktop> .\Get-PFOwnersForCalendars

At that point it should allow you to run it. Don't forget to change the extension to .ps1.
February 17, 2007 8:56 PM
 

John said:

Thanks for you help but, I have moved the files into the root and still recive this .... Do I have to register this ?
PS C:\> .\Get-PFOwnersForCalendars.ps1
The term '.\Get-PFOwnersForCalendars.ps1' is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again.
At line:1 char:30
+ .\Get-PFOwnersForCalendars.ps1 <<<<
PS C:\>
February 18, 2007 2:50 PM
 

Bill Long said:

John, you'll have to drop the .ps1 extension when you type the command. Look back at my example above.  :-)
February 18, 2007 6:56 PM
 

John said:

Bill, hate to be a pest but I have tried this every way possible and same result – I have not used powershell before but this being my 1st experience :(

PS C:\> .\Get-PFOwnersForCalendars C:\propexport.txt C:\permsexport.txt C:\mynewfile.txt
The term '.\Get-PFOwnersForCalendars' is not recognized as a cmdlet, function, operable program, or
the term and try again.
At line:1 char:27
+ .\Get-PFOwnersForCalendars  <<<< C:\propexport.txt C:\permsexport.txt C:\mynewfile.txt
PS C:\>
February 18, 2007 7:36 PM
 

BK said:

Exactly what I was looking for this morning.  Thanks!
February 19, 2007 10:30 AM
 

Bill Long said:

Well I just tried it from the root of C:, and interestingly, it won't let me run it from there. I guess it has something to do with permissions:

PS C:\> dir


   Directory: Microsoft.PowerShell.Core\FileSystem::C:\


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----         1/19/2007   8:05 PM            Documents
d-r--         2/15/2007   7:08 PM            Program Files
d-r--          2/7/2007   7:45 AM            Program Files (x86)
d-r--         1/19/2007   6:28 PM            Users
d----         2/15/2007  11:40 AM            Windows
-ar-s         1/19/2007   7:20 PM       8192 BOOTSECT.BAK
-a---         2/17/2007   7:49 PM       3295 Get-PFOwnersForCalendars.ps1


PS C:\> C:\GetPFOwnersForCalendars
The term 'C:\GetPFOwnersForCalendars' is not recognized as a cmdlet, function, operable program, or script file. Verify
the term and try again.
At line:1 char:26
+ C:\GetPFOwnersForCalendars <<<<
PS C:\> cd \users\bill\desktop
PS C:\users\bill\Desktop> dir


   Directory: Microsoft.PowerShell.Core\FileSystem::C:\users\bill\Desktop


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----         1/31/2007  11:19 PM            Netmon 3 Public Re-Release(x64)
-a---         2/17/2007   7:49 PM       3295 Get-PFOwnersForCalendars.ps1
-a---         1/19/2007   6:59 PM        792 Zune.lnk


PS C:\users\bill\Desktop> C:\users\bill\desktop\Get-PFOwnersForCalendars

Security Warning
Run only scripts that you trust. While scripts from the Internet can be useful, this script can potentially harm your
computer. Do you want to run C:\users\bill\desktop\Get-PFOwnersForCalendars.ps1?
[D] Do not run  [R] Run once  [S] Suspend  [?] Help (default is "D"): r
Invalid syntax.
PS C:\users\bill\Desktop>

So from the desktop it works fine, but not from C:\. Also in this example you can see I'm specifying the full path instead of using .\, just to make it more explicit for troubleshooting purposes.
February 19, 2007 10:34 AM
 

Alex A. said:

Grant Mailbox Permissions easiest way i did was to Create a new user. grant the user "Exchange View Only" Rights. make that user have full rights to each store. add user to local admin group of the workstation.

Let me know if this works
February 19, 2007 11:27 AM
 

HiED West Technology Briefings, News & Training said:

Updated DST Home Page Microsoft’s DST Home Page at http://www.microsoft.com/dst2007 has been updated
February 20, 2007 12:37 PM
 

BK said:

John -
Try to type Set-ExecutionPolicy RemoteSigned and try to run it again.
February 20, 2007 2:46 PM
 

John said:

Hi,
Yes I tried that also and it is set in the registry
Set-ExecutionPolicy RemoteSigned
All the built in cmlets work ok
February 20, 2007 5:07 PM
 

E-Bitz - SBS MVP the Official Blog of the SBS "Diva" said:

I'm copying an entire blog post because the info is really good.... for those who have Public folder
February 20, 2007 11:04 PM
 

Tim said:

Will there be an updated process for correcting the calendars within public folders? When watchign the video for the tool, it looks very cumbersome to have to navigate through the public folders to select and then run the outlook tool against each of the calendars in the public folders.

Can the path not be extracted using the PFDAVAdmin tool, for input into the Exchange Calendar update tool. I see that version 2.0 of the Excange Calendar update has been released, are there any plans to release an update for the Outlook tool to allow for increased functionality for dealing with the Public Folder Calendars?
February 22, 2007 10:22 AM
 

subject: exchange said:

Exchange 2007 Discontinued Features The 10 most common Exchange Server issues and how to avoid them Exchange
February 23, 2007 1:36 PM
 

jjexchange said:

I recewntly ran this to do an export, and shortly afterwards, I received calls that the calendars format had beenchanged.  All of the calendars now look like folders, and not the standard calendar view.

Can anyone tell me if this is related to the export process?  And, if so, is there a way to get these views back to normal???
February 26, 2007 9:57 AM
 

Bill Long said:

That's... odd. Whether a folder appears as a calendar folder or not is determined by the PR_CONTAINER_CLASS property. On a calendar folder this will be IPF.Appointment. If this property has been changed or cleared somehow, you can just set it back using PFDAVAdmin or mfcmapi.

I'd be very interested to find out how this occurred.
February 26, 2007 12:25 PM
 

jjexchange said:

Bill,

My bad, as I must have fat-fingered the "modify" radio button instead of "export".  Luckily, the log showed which calendars had been touched, and I reset them all back to IPF.Appointment format.

All is back to normal, and thanks for the quick reply!
February 26, 2007 12:35 PM
 

Paul Chapman said:

If you are running Cisco Unity or RIM Blackberry Enterprise Server, use the service account that these systems use because they already have the appropriate permissions in your AD and Exchange Org.

For BES, use the BESAdmin account (or your equivalent)
For Unity, use the UnityMsgStore account (or your equivalent)
February 28, 2007 11:32 AM
 

Harry said:

Hello,

There are lots of calendars in our public folders. We have to run Outlook DST tool to update each of them. Is there any way to extract calendar path from PF automatically so that we can run the tool in silent mode?

Thanks.

March 1, 2007 10:39 AM
 

Bill Long said:

Hi Harry,

I noticed on the blog post here you already answered your own question: http://msexchangeteam.com/archive/2007/02/21/435543.aspx.

One way you can save yourself the manual work is to use a Powershell one-liner like this:

get-content $home\desktop\permissionsexport.txt | foreach { "tzmove -Q \\Public Folders\All Public Folders" + $_.Split(@(9))[1].Substring(14) + "\" } > $home\desktop\mybatchfile.bat

That will produce a batch file with the tzmove commands for each folder. Note that there is one part of this one-liner that you may need to modify, and that's the [1]. In this case I'm using a permissions export where the folder path column is the second column in the tab-delimited file, so [1] refers to that column (because the first column is column 0). If you're using a Property Export where the folder path is in the first column, you'll need to change [1] to [0]. This one-liner also reformats the folder path so that it's in the format you mentioned in your comment on the other post.

You also might want to remove any lines from your file that don't contain folder paths (such as the comments at the top of a PFDAVAdmin permissions export). Otherwise the one-liner will spew errors for those lines.
March 2, 2007 7:19 PM
 

John said:

Good work on the powershell script - any ideas on how to handle " & " in the path of the Public Folder?
March 5, 2007 5:38 PM
 

Bill Long said:

Sorry John, I have absolutely no idea on that one. Does it work if you surround the whole path in quotes? Maybe someone else will have an idea.
March 5, 2007 6:00 PM
 

Bill Long said:

Hey John, someone just sent me an email thread stating that you can put a ^ (carat symbol) before the & so that cmd.exe doesn't treat the & as a special character. So try escaping the & with ^, like:

\\public folders\all public folders\stuff & other stuff\

becomes:

\\public folders\all public folders\stuff ^& other stuff\
March 5, 2007 6:12 PM
 

John said:

Good Job - works great - ^& thanks !!
March 5, 2007 7:57 PM
 

John said:

So now when have the script :) - how can we get the tool to create a Log. We only get one per PF Calendar and then it is overwritten when the script runs the next line …..
March 5, 2007 8:12 PM
 

Maria said:

Whats the solution then for double-booking problems when direct-booking (E2k3)? We have installed 926666 and then done the calendar update tool against resources (conf rooms, etc), then ran the calendar update tool against user mailboxes. All PF folders were manually updated with tzmove.

But, people can now double-book conf rooms.  How do we remedy this? The resources settings are configured as they have always been - to disallow conflicting appts, yet, people can now double-book as a result of the DST updates....
March 6, 2007 3:41 PM
 

Microsoft Higher Education Tech NE said:

Here's some updates for DST. I also have access to premier support information if you have questions
March 6, 2007 4:52 PM
 

Daylight Saving Time - Technical Chats said:

Q: When you run the tzmove on public folders can you point it to the root and have it sweep for all calendars?
March 7, 2007 6:19 PM
 

John said:

Dose anyone have a script to copy PF calendars to a backup folder ?
March 8, 2007 1:16 PM
 

john11 said:

Tried the first method to identify the Public Folders and their owners. It identifed the Public Folders ok, but I don't see the owners anywhere. Where are the owners' names? Did I leave out a step?
March 10, 2007 12:23 PM
 

Bill Long said:

john11, the first method listed only identifies the calendar folders. In order to determine who their owners are, you'll either need to run a separate permissions export and then use the attached script to correlate the two, or use the second Custom Bulk Operation where you only export permissions for calendar folders.
March 12, 2007 1:05 PM
 

Microsoft Exchange PFDAVAdmin « KTS Blog said:

April 25, 2007 12:16 AM
New Comments to this post are disabled

News

This is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified in the Terms of Use.

New! Would you like to suggest a topic for the Exchange team to blog about? Send suggestions to us.

Poll: