1

I´m searching for an good way to find the ContentQuery WebPart in my WebApplication. My plan is to write a PowerShell script and create a url list.

I found the following possible ways:

  • SharePoint Object model, I think to slow because I must check every page
  • SQL query, fast but not possible in my environment.

Are there also other ways? Is it possible to use CAML?

1

If you're looking for a PowerShell script then I've written one before to do this kind of thing. I've done this several times to find custom web parts that have been in our solution and needed updating following a new release.

My script lists all web parts but it is easily modified to filter out based on the type value of the web part (modify the $wps variable).

4

The SharePoint Object Model is the (only supported) way to do it.

  • You are not allowed to access the Content Databases with SQL as far as i know. – Stefan Bauer Oct 31 '11 at 20:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.