Looking for a help in getting a PowerShell script to remove SharePoint subsite permissions alone. The groups should exist and users under the groups also. The script should only remove the permission levels assigned to the groups and the users directly added. We need to remove permissions of subsites from different site collections.
Can someone help me with this script please?
Thanks
MadhuPosted Feb 20, 2023, 5:15 PM
Thank you Naimish and Jignesh for your quick response.
Hi Naimish, Need to add site URL, group name in the script you have shared. But we have over 500 sites which are from different site collections and we are not sure on how many groups those subsites and the permission levels too. We do not want to remove groups or users from the sites.
Hi Jignesh, Does your script will impact only the subsite that is dealing with or will it impact the sub-subsites also under the parent subsite. how to ignore sub-subsites, if it impacts all the sub-subsites under a parent susite?
Naimish MakwanaPosted Feb 20, 2023, 7:25 AM
Hello Madhu,
Try below script.
Thaks
Naimish Makwana
Jignesh KumarPosted Feb 20, 2023, 7:15 AM
Hello,
Can you please try below,