Get-WssMsoSharePointPermission

Get-WssMsoSharePointPermission

Gets permission settings for a SharePoint Online securable object.

Syntax

Parameter Set: ByLibrary
Get-WssMsoSharePointPermission [-Library] <SharePointLibrary> [[-User] <SharePointUser> ] [ <CommonParameters>]

Parameter Set: BySite
Get-WssMsoSharePointPermission [-Site] <SharePointSite> [[-User] <SharePointUser> ] [ <CommonParameters>]

Detailed Description

The Get-WssMsoSharePointPermission cmdlet gets permission settings for a SharePoint Online securable object. A site stores the SharePoint Online library.

Parameters

-Library<SharePointLibrary>

Specifies a SharePoint library. The cmdlet gets permission settings for the 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 SharePoint site. The cmdlet gets permission settings for the site that you specify.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-User<SharePointUser>

Specifies a SharePoint user. The cmdlet gets permission settings for the user that you specify.

Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

True (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.

  • System.String

Examples

Example 1: Get SharePoint permissions

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

The second command uses the Get-WssMsoSharePointPrincipal cmdlet to get a SharePoint principal, and stores the result in the $Principal variable.

The last command gets the SharePoint permissions for the library named $Library and the principal named $Principal.

PS C:\> $Library= Get-WssMmoSharePointLibrary | Select-Object -First 1
PS C:\> $Principal= Get-WssMsoSharePointPrincipal | Select-Object -First 1
PS C:\> Get-WssMSOSharePointObjectPermission -SecurableObject $Library -Principal $Principal
PS C:\> 

Remove-WssMsoSharePointPermission

Set-WssMsoSharePointPermission