Disable-WssMsoSharePointPermissionInheritance

Disable-WssMsoSharePointPermissionInheritance

Disables permission inheritance for a securable object.

Syntax

Parameter Set: ByLibrary
Disable-WssMsoSharePointPermissionInheritance [-Library] <SharePointLibrary> [ <CommonParameters>]

Parameter Set: BySite
Disable-WssMsoSharePointPermissionInheritance [-Site] <SharePointSite> [ <CommonParameters>]

Detailed Description

The Disable-WssMsoSharePointPermissionInheritance cmdlet disables permission inheritance for a securable object. Securable objects include sites, lists, libraries, folders, documents, or items.

Parameters

-Library<SharePointLibrary>

Specifies a library. The cmdlet disables permission inheritance for a library that you specify.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-Site<SharePointSite>

Specifies a site. The cmdlet disables permission inheritance for a site that you specify.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • Microsoft.WindowsServerSolutions.O365Integration.SharePointLibrary,Microsoft.WindowsServerSolutions.O365Integration.SharePointSite

    Library

    Type: Microsoft.WindowsServerSolutions.O365Integration.SharePointLibrary

    Description: SharePoint library

    Site

    Type: Microsoft.WindowsServerSolutions.O365Integration.SharePointSite

    Description: SharePoint site

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Example 1: Disable SharePoint permission inheritance

The first command uses the Get-WssMsoSharePointLibrary cmdlet to get a library, and stores the result in the $Library variable.

The second command disables permission inheritance for the library named $Library.

PS C:\> $Library = Get-WssMsoSharePointLibrary | Select-Object -First 1
PS C:\> Disable-WssMsoSharePointPermissionInheritance -SharePointLibrary $Library
PS C:\> 

Enable-WssMsoSharePointPermissionInheritance