Programmatically set Public Folder Permissions

I would like to automate part of the process of creating public folders.  Specifically, I would like to remove "Owner" permissions and add "Publishing Author" permissions for specific users/folders using a script of some sort.

Any thoughts?
LVL 20
Who is Participating?
redseatechnologiesConnect With a Mentor Commented:
Hi RPPreacher,

Have a look at PFDavAdmin, it is a more powerful way to control public folder permissions (although, scripting may not be possible) however that would be the place to start looking.

The following code allows you to create a folder using code. It uses the System.IO namespace.

string FolderName = "testFolder";
DirectoryInfo thisFolder = new DirectoryInfo(Server.MapPath("/files/" + FolderName));
if (!thisFolder.Exists)
check this article as explains How to programmatically set NTFS file system folder permissions by using Active Directory Service Interfaces in Microsoft Visual C#

RPPreacherAuthor Commented:
I wasn't clear... these are public folders in Exchange.  My bad.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.