I found an interesting script that easily enumerates all shared folders and it creates a .csv file (for reporting purposes).
Here it is relative script and link:
https://social.technet.microsoft.com/wiki/contents/articles/51422.how-to-export-folder-permissions-to-excel-or-csv-file.aspx
This powershell script enumerates all folder and subfolders permissions of a folder and exporting it to ,csv file.
An alternative article (that I did no test)