You can use the Dsexport.exe utility to export directory information about public folders. The Dsexport.exe utility is available in the Microsoft Platform Software Development Kit (SDK). Dsexport.exe is located in the Samples\Dbmsg\Exchange\Dsexport directory.
Dsexport.exe has some command-line arguments that are not recognized by the Microsoft Exchange Administrator Import\Export processor. These arguments make this tool particularly useful for dumping objects other than mailbox or recipient container objects.
For more information about Dsexport.exe, see the Microsoft Platform SDK documentation.
Dsexport.exe outputs information to a text file as comma separated values (.csv). If the destination file exists before you run Dsexport.exe, and this destination .csv file lists the name of each of the desired object attributes separated by commas, the file is used as a template header file when you run Dsexport.exe. This permits you to control the object attributes that are dumped. If the .csv file does not already exist, the file is created with 13 basic fields.
- Copy Dsexport.exe to the \Exchsrvr\Bin directory.
- In the \Exchsrvr\Bin directory, create a text file named PFlist.csv that contains only the following line of text:
Obj-Class,Directory Name,Display Name,E-mail Addresses
You can add any other attribute that you require to this header line. - Run the following command (all on one line) from the \Exchsrvr\Bin directory:
dsexport /FILE=PFLIST.CSV /DSA=%1
/BASEPOINT=/o=%2 /ou=%3 /CLASSES=PUBLIC-FOLDER /HIDDEN /SUBTREE
where:
%1 = <local exchange servername> (Case sensitive)
%2 = <organization name> (Case sensitive)
%3 = <site name> (Case sensitive)
This creates a PFList.csv file that includes one line for each public folder that is in the site.
To export a list of all public folders in the entire Exchange organization instead of for one particular site, run the following command (all on one line):
dsexport /FILE=PFLIST.CSV /DSA=%1 /BASEPOINT=/o=%2 /CLASSES=PUBLIC-FOLDER /HIDDEN /SUBTREE