In order to break inheritance on a subsite, so that it doesn’t inherit the permissions from the parent site, you can do so manually via SharePoint. However, it may be more beneficial to do this programmatically via PowerShell, especially if your PowerShell script already creates all of the Groups and sets the permissions on your subsite.
Follow these steps to Break Inheritance to your subsite manually through SharePoint:
- Navigate to your SharePoint website in the browser. Make sure to navigate to the specific subsite that you want to break inheritance on.
- Navigate to Site Actions -> Site Permissions
- Click Stop Inheriting Permissions
Follow these steps to Break Inheritance to your subsite programmatically through PowerShell:
- Add the following logic to your PowerShell script (.ps1) and run the script as an administrator via the SharePoint Management Shell on the server that hosts your SharePoint site.
Note: The variable, $url, should be the location of your SharePoint Subsite
$url = http://SharePointSite.com/SubSite
$web = Get-SPWeb -Identity $url