Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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.
Specifies a library. The cmdlet sets permissions 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 |
Specifies the permission for a principal to modify. The acceptable values for this parameter are:
-- NoAccess
-- Read
-- Edit
-- FullControl
Aliases |
none |
Required? |
true |
Position? |
3 |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
Specifies a site. The cmdlet sets permissions 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 |
Specifies a name for a user account. The cmdlet sets permissions for the name that you specify.
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
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).
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
The output type is the type of the objects that the cmdlet emits.
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