Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info
iconfalse
titleDescription

You can use the Item Query report to find text, web parts, large files, old files, files modified by specific people, files with many versions, web pages with errors, and much more

Step-by-

...

Step

Widget Connector
urlhttp://youtube.com/watch?v=GYONOxbsuuY

There are often times when working with SharePoint where you need to find specific content, text or even HTML code throughout the site. Most of the time you rely heavily on either a manual check or search to find what you need. Both of these options can be time consuming and often not return the content you are looking for.

Within the Essential SharePoint Toolkit, you can utilize the “Item Query” feature to find any type of text or content easily. Within one of the pages in the On-premises SharePoint site, a page has been created that contains a SharePoint Script Editor web part with the following code:

Image Modified

This code simply draws a square with a button and text field allowing you to change the color of the square.

If you wanted to find all instances of this code then you would have to manually check page by page. However, with the toolkit you can run crafted queries that will search all content for this. To create this query, open the Essential SharePoint Toolkit and click the SharePoint button on the top navigation.

Image Modified

Next select the Content button from the top navigation, then expand the Discover, menu and select Item Query.

Image Modified

Image Modified

UPDATE: (SET v5.9.0.0) You can now also select one or more sites from the Home Page Dashboard to perform a Query against.

Image Modified

From the Item Query window, set the Job Name, and then select the Site Url to Scan.

Image Modified

Next ensure the Credentials are set that match the SharePoint connection that you selected. The bulk of the configuration is then completed within the Query Options section of the Item Query window.

Image Modified

Selecting the first dropdown allows you to set to either Include or Exclude specific queries. The second dropdown allows you to choose how you want to find this data you are searching for by using various properties and the file content itself.

Image Modified

Once you have selected to Include or Exclude, and then the property to search within, you can then determine the comparison from the dropdown.

Image Modified

The text field can then be populated with the text value or values you are looking for in the content. For the JavaScript function example, you can use: “function ChangeDivColor“.

Image Modified

As with any query in the toolkit you can then also add Inclusion Rules, Email options and Export option. For this simply leave these as the default, so the results are returned within the tool itself. Now Save the job, and then select the Schedule Job button to set the job to run immediately.

Image Modified

Once you have scheduled the job, you will then be taken to the schedule grid where the newly created job is now listed.

Image Modified

Right click on the job and select the Run Now option which will cause the newly created job to run.

Image Modified

Once the job is completed the Job Status will display Complete. Now you can right click, select the View Reports item and then select the Item Query Report.

Image Modified

The results of the job will now be displayed. As you can see, it has found the page that contains the JavaScript.

Image Modified

If needed right clicking on the entry will allow you to go direct to the item itself. In this instance, it will take you to the properties for the page, not the page itself.

Image Modified

Export

You can then take your results and export them to Excel/CSV/SharePoint.

Using the Item Query option, you can be very specific and granular when searching over the content. It is a very powerful feature of the SharePoint Essentials Toolkit.

Filter by label (Content by label)
showLabelsfalse
max5
spacescom.atlassian.confluence.content.render.xhtml.model.resource.identifiers.SpaceResourceIdentifier@958
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ("sharepoint","clean","user","permissions","up") and type = "page" and space = "KC"
labelsClean up user permissions sharepoint

...