Script to disable list, libraries from SharePoint crawler

This script will disable all list and libraries from search result in the site collection.

You can disable it from list/library’s advanced settings. If numerous lists then the script will make it easier.