Solved

Programmatically set Public Folder Permissions

Posted on 2006-11-07
6
1,047 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
6 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 500 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

Free book by J.Peter Bruzzese, Microsoft MVP

Are you using Office 365? Trying to set up email signatures but you’re struggling with transport rules and connectors? Let renowned Microsoft MVP J.Peter Bruzzese show you how in this exclusive e-book on Office 365 email signatures. Better yet, it’s free!

Join & Write a Comment

We are happy to announce a brand new addition to our line of acclaimed email signature management products – CodeTwo Email Signatures for Office 365.
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
In this video we show how to create a User Mailbox 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 Recipients >> Mailb…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

743 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now