This is similar to the previous post but the logic is differently used in the code.
(http://sharepoint-powershell.blogspot.com/2012/10/bulk-deleting-of-user-permissions-from_17.html)
Since this script is only used for Read-only sites (in locked state), we will loop through each locked sites and enumerate users.
Purpose of the Script: If you have a requirement to cleanup permissions of Ex-Employees or Deleted Users, then you can use this PowerShell Script.
*Please understand that this script was developed for a specific requirement and it may not work exactly same for your environment. So, use script at your own risk.
http://sharepoint-powershell.blogspot.com/p/start-variables-uri-httpsubweb.html
This PowerShell script uses an input file and the path/file name are hard-coded in the code. You may have to change certain other hard-coded values of File Paths, Input Filename, Account Name of the user who will be replacing the permission role of the deleted user.
The script enumerates through each Site Collection, if Site is found in locked state, it will unlock and enumerates though each user and delete all users permissions and finally Locks the site. Every activity is logged into different log files of my interest. You can customize as per your requirement.
The input file for this PowerShell script file is ExEmployees.csv
Basically it contains, list of NT names under the column header NTName.
NTName
Domain\Vaddiv
Domain\Account1
Domain\Account2
(http://sharepoint-powershell.blogspot.com/2012/10/bulk-deleting-of-user-permissions-from_17.html)
Since this script is only used for Read-only sites (in locked state), we will loop through each locked sites and enumerate users.
Purpose of the Script: If you have a requirement to cleanup permissions of Ex-Employees or Deleted Users, then you can use this PowerShell Script.
*Please understand that this script was developed for a specific requirement and it may not work exactly same for your environment. So, use script at your own risk.
http://sharepoint-powershell.blogspot.com/p/start-variables-uri-httpsubweb.html
This PowerShell script uses an input file and the path/file name are hard-coded in the code. You may have to change certain other hard-coded values of File Paths, Input Filename, Account Name of the user who will be replacing the permission role of the deleted user.
The script enumerates through each Site Collection, if Site is found in locked state, it will unlock and enumerates though each user and delete all users permissions and finally Locks the site. Every activity is logged into different log files of my interest. You can customize as per your requirement.
The input file for this PowerShell script file is ExEmployees.csv
Basically it contains, list of NT names under the column header NTName.
NTName
Domain\Vaddiv
Domain\Account1
Domain\Account2
No comments:
Post a Comment