Let’s say you have a bunch of Content Query Web Parts that someone put on a SharePoint site that you need to maintain. These CQWPs all use various Content Types, and that’s all you have to go on, but you need to find out which lists use those content types.

It’s easy to do in PowerShell (SharePoint 2010 Management Shell). Just open up notepad and copy in these lines:

$site = Get-SPSite("http://<Your Site Domain>")
$webs = get-spsite $site -Limit all | get-spweb -Limit all
$CTname="<Your CT Name>"

foreach ($web in $webs) 
 {
   foreach ($lst in $web.lists) 
   { 
     foreach ($ctype in $lst.ContentTypes) 
     { 
       if ($ctype.Name -eq $CTName) 
       { $lst.DefaultViewUrl }
     }
   } 
   $web.Dispose() 
 }

All you need to do is replace ‘Your Site domain’ with your SharePoint site, and replace ‘Your CT Name’ with the Content Name by which you need to search.

Then, once you’ve saved that file, open it up in Powershell and it will list all the lists that use your content type.