********************************************************************** Microsoft Exchange Public Folder Information Program, v3.60 Developed by: Kali Buhariwalla, Microsoft Technical Support ********************************************************************** The Microsoft Exchange Public Folder Information Program (PFInfo.Exe) is a program that extracts information about the Public Folders in a Microsoft Exchange Site. This information is saved into a delimited file, which can be viewed in a spreadsheet like Microsoft Excel. The data can then be manipulated in any way desired. PFInfo.exe can also generate a file, with information on public folder permissions and replicas, that can be used in conjunction with the PFAdmin.exe utility shipped in the BackOffice Resource Kit. To use this file with PFAdmin.exe, you must have PFAdmin.exe, version 1.3 or higher COMMAND LINE OPTIONS ==================== PFINFO.EXE supports the following command line options: -S - Indicates that the program is being running from a service, like the Windows NT Schedule service. -LogMin - Set the logging level to minimum -LogMed - Set the logging level to medium -LogMax - Set the logging level to maximum RUNNING THE PROGRAM =================== To run the program, double click on PFINFO.EXE from the Windows NT Explorer or File Manager. Select the desired output file and the separator to be used when writing data to the output file. To generate an import file for PFAdmin.exe, select the option, "Create file for use with PFAdmin.exe". By default this information is written to a file called PFAdmDat.txt. To change the filename as well as configure what information is written out to the import file,click the button labelled "Options". To start the program, click on the button labeled 'Start'. Now the program should list all the Microsoft Exchange profiles available on the local machine. Select a profile that has the Microsoft Exchange Server service listed and is configured with a mailbox on a server in the site from which you wish to extract Public Folder information. The program will now step through all the available Public Folders and extract data on these folders, writing this data to the specified output file. Any errors will be logged in the specified log file. It is recommended that you are logged into Windows NT as the Microsoft Exchange Service Account. To speed up operation of this program, it is recommended that you select the "Only extract data for public folders homed in the current site" option. This will cause the program to not try and connect to any folders that are not homed in the site it is connected to. This is the site containing the mailbox specified in the profile selected. Hence in order to extract information about all public folders in an Exchange organization, it is recommended that PFInfo.exe be run in each site. Version 3.1 and higher of PFINFO.EXE, supports the use of an .INI file. The program will read the settings in a file called PFINFO.INI, which should be present in the same directory as the executable. The .INI file, allows PFINFO.EXE to be run in batch mode, possibly in a scheduled manner. For more information on the INI file settings available, please refer to the INI file. USING PFINFO.EXE TO RECOVER LOST PUBLIC FOLDER permissions ========================================================== In some circumstances, the permissions on all (or some) public folders in an organisation may be lost. In these situations, PFINFO.EXE can be used to easily recover public folder permissions. If a current version of the PFADMDAT.TXT file, created by PFINFO.EXE for use with PFADMIN.EXE, is available, this file can be imported to restore the permissions. This assumes that the file was created, before the loss of public folder permissions. If a valid PFADMDAT.TXT file is not available, follow the steps below: 1) On a recovery server, install Microsoft Exchange Server. a) Select the option to create a NEW SITE. b) Use the same Organisation and Site names as the production servers. 2) Upgrade the server to the same service pack as the production server. 3) Restore the Public Information Store, from Backup, onto the recovery server. 4) DO NOT run the DS/IS Consistency Checker. If you do, you will lose all Public Folder permissions. 5) Create a test user, on the recovery server. 6) Install the Exchange client or Outlook on the recovery server. 7) Create a profile for the test user created in step 5. 8) Run PFINFO.EXE a) Do not select the option "Only extract data for public folders homed in the current site". b) Click on the Options button to display the PFAdmin Output File Option dialog. Make sure that the option to include Public Folder Permissions is selected. Click OK. c) Click on Start and select the profile created in step 7. 9) Once PFINFO.EXE has completed, use the file PFADMDAT.TXT created by PFINFO.EXE, as input for PFADMIN.EXE REQUIREMENTS ============ The program requires that the Microsoft Exchange client be installed on the machine on which it is run. The program requires the following DLL files, most of which should be installed when you install the Microsoft Exchange Client and Administrator programs. aclcls.Dll ADVAPI32.dll COMCTL32.dll comdlg32.dll GAPI32.dll GDI32.dll KERNEL32.dll LZ32.dll MAPI32.dll MFC42.DLL MPR.dll MSVCIRT.dll MSVCRT.dll MSVCRT40.dll ntdll.dll ole32.dll RPCRT4.dll SHELL32.dll USER32.dll VERSION.dll DATA EXTRACTED BY THE PROGRAM ============================= The current version of the program will extract the following information to the delimited output file. 1) Folder Name 2) Folder Path 3) Permissions 4) List of Public Folder Replicas 5) Number of Replicas of the Public Folder 6) Number of Items in the Public Folder 7) Size in KiloBytes of the contents of the folder, not including sub-folders 8) Age Limit 9) Replication Message Priority 10) Replication Schedule 11) Alias 12) Storage Limit (K) 13) Date the Public Folder was Created 14) Date the Public Folder was last modified (As seen in the Exchange Administrator program) 15) Home Site 16) Home Server 17) E-mail Addresses AUTOMATING THE EXTRACTION OF PUBLIC FOLDER INFORMATION, USING WINAT =================================================================== It is possible to run PFINFO.EXE in a batch process. This will allow the program to be run from a scheduler and hence it is possible to run the program every night to make a backup of the public folder permissions. This can be extremely useful in case of an emergency where all public folder permissions are lost, as explained above. To extract public folder information in batch mode, you must be running PFINFO, Version 3.5 or later. With this release the capability to read configuration information from an INI file was added to the program. This allows the program to be run without any user intervention, using the Windows NT AT Scheduler. Instead of using the Windows NT AT command to schedule a task from a command prompt, it is easier to use the WINAT.EXE program that uses to GUI to schedule tasks. The WINAT.EXE program ships in the Microsoft Windows NT Resource Kit. Running PFINFO.EXE using WINAT.EXE ----------------------------------- 1) Start the Windows NT Schedule Service. Use the Exchange Service Account as the startup account. If the Schedule service is started using the Local System Account, PFINFO.EXE will fail with a MAPI Logon Error. 2) Set the following settings in the PFINFO.INI file. This file should be in the same directory as the PFINFO.EXE file. [PFINFO] ProfileName= Where is a profile containing the Exchange Server service. The Exchange Server service should be configured with a server in the site that you wish to extract public folder data from, as well as a mailbox on the server specified. In addition to the above settings, you can also configure the names of the output files, log file and other settings using the .INI file. For more information on the INI file settings available, please refer to the section below. 3) Run WINAT.EXE 4) From the Edit menu, select Add. This will bring up the Add Command dialog as shown below WINAT.EXE - Add Command dialog 5) In the Command edit box, enter \PFINFO -S Where is the full path to the PFINFO.EXE file The -S command line option specifies that the program will be executed from a service. If the -S option is specified, the program will execute without displaying any user interface and not wait for any user input. However, you must make sure that the ProfileName entry in the .INI file has a valid profile specified and that this profile is not configured for offline use. Otherwise the program will not be able to successfully perform a MAPI login and will fail. The -S option should only be specified when running PFINFO from the Windows NT Scheduler. When running PFINFO interactively (from a command prompt or Windows Explorer), the -S command line option should NOT be specified. When the -S command line option is specified, the program assumes that it is being called from a Service and initializes MAPI differently. 6) Configure when you wish the program to be executed. 7) Click on OK. 8) Exit WINAT 9) The Windows NT Scheduler will automatically execute PFINFO at the time specified and the output files will be generated in the locations specified in the PFINFO.INI file. Note: The INI file with all the configuration information must be present in the same directory as the executable and must be called PFINFO.INI TROUBLESHOOTING =============== The program generates a log that contains all errors that the program encounters. It also supports the following command line options that increase the amount of information logged. -logmin -logmed -logmax KNOWN ISSUES ============ Error getting folder properties: Error E_FAIL - Unknown Failure --------------------------------------------------------------- This error is noticed when trying there are no accessible replicas of the folder. The error may be noticed when a Public Store (PUB.EDB) is restored on a recovery server with a different name from the server from which the PUB.EDB was obtained. To resolve this problem, go to the Instances page of the Public Information Store on the recovery server and add an instance of every public folder to the local server. PFINFO.EXE crashes with a Dr. Watson dump ----------------------------------------- Check the version of the ACLCLS.DLL file. The time stamp should be 1/15/96 or later. VERSION INFORMATION =================== Version 2.1 --------------- 1) Added support for getting the folder e-mail addresses Version 3.0 ------------ 1) Added support for creating a PFAdmin compatible import file 2) Added option to extract data only for folders homed in the current site. 3) Fixed problems where the permissions were not correctly determined. Version 3.1 ----------- 1) Added support for an INI file Version 3.11 ------------ 1) Fixed a bug in which an extra tab was added to the PFADMDAT.TXT output file. Version 3.12 ------------- Added symbolic information to release executable Version 3.13 ------------ Changed the program output and text to say that we need PFAdmin, v1.3 or higher, instead of v1.2.1 or higher, shown in the previous versions of PFINFO.EXE Version 3.5 ----------- Fixed multiple issues Fixed problems extracting permissions Added support for the -S command line switch, which allows the program to be used when running from the AT scheduler. Version 3.51 ------------ The program now extracts the Folder DN. Version 3.53 ------------ Supports the -oneperline command line setting. If this option is specified, when generating the pfadmdat.txt file, the program will write out permissions for a mailbox on public folder on a separate line, instead of writing all the permissions on a public folder on the same line. Sometimes the line written could get very large causing problems in pfadmin. In these cases, specifying the -oneperline switch is useful. Version 3.60 ------------ The program now extracts the value of the "Limit Administrative access to home site" attribute.