Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Break Inheritance from parent site programmatically

  Asked By: Gino    Date: May 05    Category: Sharepoint    Views: 5012

I am creating a web site using custom features and stsadm commands run
from a VBscript.

I create new security groups to be applied to the new site and its
multiple sub sites (stsadm.exe -o creategroup). However, I get an error
when I apply them to the main site because it inherits its permissions
from a parent site. The error says that as long as it inherits from a
parent, the new security groups cannot be applied.

Is there a way to break the inheritance for an entire site
programmatically? I need to do this before creating the new security
groups.

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Uttam Vanjare     Answered On: May 05

Call the BreakRoleInheritance method of the SPWeb object passing it a boolean
for whether you are breaking or establishing inheritance. I'm not sure this is
available in VBscript, but could be accessed from PowerShell.

 
Answer #2    Answered By: Esha Attlee     Answered On: Jun 28

I think you should have a look at the below site

www.learningsharepoint.com/.../

 
Didn't find what you were looking for? Find more on Break Inheritance from parent site programmatically Or get search suggestion and latest updates.