Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Programmatically set Public Folder Permissions

Posted on 2006-11-07
6
Medium Priority
?
1,088 Views
Last Modified: 2012-06-21
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?
0
Comment
Question by:RPPreacher
  • 2
4 Comments
 
LVL 3

Expert Comment

by:rugu_16
ID: 17899345
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();
}
 
0
 
LVL 3

Expert Comment

by:rugu_16
ID: 17899370
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

0
 
LVL 20

Author Comment

by:RPPreacher
ID: 17906113
I wasn't clear... these are public folders in Exchange.  My bad.
0
 
LVL 39

Accepted Solution

by:
redseatechnologies earned 2000 total points
ID: 17909149
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.

http://www.microsoft.com/downloads/details.aspx?FamilyID=635BE792-D8AD-49E3-ADA4-E2422C0AB424&displaylang=en

-red
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If something goes wrong with Exchange, your IT resources are in trouble.All Exchange server migration processes are not designed to be identical and though migrating email from on-premises Exchange mailbox to Cloud’s Office 365 is relatively simple…
Stellar Exchange Toolkit: this 5 in 1 toolkit comes loaded with mega-software tool. Here’s an introduction to tools’ usage and advantages:
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…
how to add IIS SMTP to handle application/Scanner relays into office 365.
Suggested Courses

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question