Link to home
Start Free TrialLog in
Avatar of RPPreacher
RPPreacherFlag for United States of America

asked on

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?
Avatar of rugu_16
rugu_16

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)
{
    thisFolder.Create();
}
 
check this article as well...it explains How to programmatically set NTFS file system folder permissions by using Active Directory Service Interfaces in Microsoft Visual C#

http://www.kbalertz.com/kb_899553.aspx

Avatar of RPPreacher

ASKER

I wasn't clear... these are public folders in Exchange.  My bad.
ASKER CERTIFIED SOLUTION
Avatar of redseatechnologies
redseatechnologies
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial