A couple of days ago I noticed a tweet in the #SPHelp feed that called my attention. Here it is:
— Eric VanRoy (@EVanRoy) October 8, 2014
I was sure that I already used a Powershell script to do that, but when I found and tried it I noticed that all the resulting rows reported only ErrorWebPart. After googling for some minutes I fount a blog post of Glyn Clough (this is the url http://www.glynblogs.com/2011/07/listing-all-web-parts-in-a-site-collection-with-powershell.html) that inspired me (thank you Glyn :)) to create a new script that I just published on TechNet Gallery.
The script loop through a site collection (or a list of site collections) and creates a log file (CSV) listing all the web parts opened in all pages. The script accepts three parameters: URL, folder, WP (otpional).
- URL contains the URL of the site collection (or a comma separated list of URLs) where you want to search in;
- Folder is where you want to save the report. It must be an existing folder;
- WP (optional) is the name (or part of the name) of the web part you want to search for.
Setting the WP parameter the script creates a second log file listing only the web parts corresponding to the search criteria.
You should call the script the following way:
.\list-all-webparts.ps1 -Url "http://fifteen,http://sp2013r2" -folder "C:\GTLab" [-WP "Site Feed"]
You can download the script from TechNet Gallery here: