Today I am providing the Power Shell Script that will display a list of all Security Group and Users and also can generate a txt file for the same
Inputs - Following are the Input for the script.
Site URL - Url of the site for which you need the user and group list.
Outputs –This script will display the list of all the groups and their users in the given site.
.\scriptname.ps1 | out-file “FilePath\Filename.txt”
For executing this script user must be added in site collection administrators in all the sites.
User should have Shell Admin rights to run the scripts.
Run Management Shell as an Administrator.
How to execute -
Copy this script and paste in Note pad.
Save this file as .ps1.
Run this script in SharePoint Management Shell.
Follow on screen instructions.
FOR ANY HELP ON THIS SCRIPT USE "GET-HELP .\SCRIPTNAME.PS1 --FULL" AFTER SAVING THIS FILE.
Go to above link to get the script.