Can any one help on how to set the SharePoint online site List/Library to read only using Power-Shell script?


There's no setting as such but you can give the List or Library unique permissions and set all groups/users to have only Read permissions to the list.

Here is an article that describes how to do this using PowerShell:



You can use Set-PnPListPermission to remove and add users/groups permissions.

Two blogs for your reference:

SharePoint Online: Remove User or Group from List Permissions using PowerShell

SharePoint Online: Grant Permission to List or Library using PowerShell

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.