Problem:
Client wants a list of all permissions on a site.
Solution:
This one was fun
- Create a folder on your machine called Scripts
- Reference this site: https://www.sharepointdiary.com/2019/09/sharepoint-online-user-permissions-audit-report-using-pnp-powershell.html
- Save file to Scripts folder with the extension .ps1
- Important, you have to edit the file so that it references the correct SharePoint site and save location for the output
- Run Powershell ISE in Admin mode (this is important as it won’t work otherwise
- Run Install-Module -Name PnP.PowerShell -RequiredVersion 1.12.0
- Go to Scripts folder
- Run .\FILENAME.PS1