Set-WssMsoSharePointPermission

Set-WssMsoSharePointPermission

Sets permission settings for a securable object.

構文

Parameter Set: ByLibrary
Set-WssMsoSharePointPermission [-Library] <SharePointLibrary> [-User] <SharePointUser> [-Permission] <WssMsoSharePointPermissionType> {Edit | FullControl | NoAccess | Read} [ <CommonParameters>]

Parameter Set: BySite
Set-WssMsoSharePointPermission [-Site] <SharePointSite> [-User] <SharePointUser> [-Permission] <WssMsoSharePointPermissionType> {Edit | FullControl | NoAccess | Read} [ <CommonParameters>]

詳細説明

The Set-WssMsoSharePointPermission cmdlet sets permission settings for a securable object, such as a library or a site. An site stores the library.

パラメーター

-Library<SharePointLibrary>

Specifies a library. The cmdlet sets permissions for the library that you specify.

エイリアス

なし

必須?

true

位置は?

1

既定値

なし

パイプライン入力を許可する

True (ByValue, ByPropertyName)

ワイルドカード文字を許可する

false

-Permission<WssMsoSharePointPermissionType>

Specifies the permission for a principal to modify. このパラメーターに対して使用できる値:

     -- NoAccess
     -- Read
     -- Edit
     -- FullControl

エイリアス

なし

必須?

true

位置は?

3

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-Site<SharePointSite>

Specifies a site. The cmdlet sets permissions for the site that you specify.

エイリアス

なし

必須?

true

位置は?

1

既定値

なし

パイプライン入力を許可する

True (ByValue, ByPropertyName)

ワイルドカード文字を許可する

false

-User<SharePointUser>

Specifies a name for a user account. The cmdlet sets permissions for the name that you specify.

エイリアス

なし

必須?

true

位置は?

2

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

  • 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

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

Example 1: Set 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 sets the SharePoint permissions for the library named $Library and the principal named $Principal.

PS C:\> $Library= Get-WssMSOSharePointLibrary | Select-Object -First 1
PS C:\> $Principal= Get-WssMSOSharePointPrincipal | Select-Object -First 1
PS C:\> Set-WssMSOSharePointObjectPermission -Object $Library -Principal $Principal -Permission FullControl

関連トピック

Get-WssMsoSharePointPermission

Remove-WssMsoSharePointPermission