Inventory SharePoint solutions for use in a web application. Each of these files search for a different type of solution and its use.
$webApplicationName = ""
$searchPhrase = "filteredlookup"
$cnt = 0
$wa = Get-SPWebApplication()
foreach($site in $wa.Sites)
{
foreach ($web in $site.AllWebs)
{
foreach($list in $web.Lists)
{
$listURL = $list.RootFolder.Url
foreach($item in $list.items){
$itemTitle = $item.fields | ?{$_.fieldrenderingcontrol -like '*$searchPhrase*'} | ft Title
if($itemTitle -ne $null){
#"Item Title: " + $itemTitle
$web.url + "/" + $listURL
$cnt++
}
break
}
}
}
}
"Count:"
$cnt
$w = get-spweb http://spsvde001
foreach($list in $w.Lists)
{
if($list.BaseType -eq "DocumentLibrary")
{
foreach ($item in $list.Items) {
$file = $item.File
if($file.name -like "*aspx"){
$url = $file.ServerRelativeUrl
$fileUrl = $file.ServerRelativeUrl
$manager = $file.GetLimitedWebPartManager([System.Web.UI.WebControls.Webparts.PersonalizationScope]::Shared)
$wps = $manager.webparts
$manager.Dispose()
foreach($wp in $wps)
{
if($wp -like "*Advance*"){
$url
$wp.WebBrowsableObject.Title
}
}
}
#$wps | ft WebBrowsableObject #| select-object @{Expression={$file.Web.Url};Label="Web URL"},@{Expression={$fileUrl};Label="Page URL"}, DisplayTitle, IsVisible, @{Expression={$_.GetType().ToString()};Label="Type"}
}
}
}
foreach ($file in $web.Files) {
if($file.name -like "*aspx")
{
$url = $file.ServerRelativeUrl
$fileUrl = $file.ServerRelativeUrl
$manager = $file.GetLimitedWebPartManager([System.Web.UI.WebControls.Webparts.PersonalizationScope]::Shared)
$wps = $manager.webparts
$manager.Dispose()
foreach($wp in $wps)
{
if($wp -like "*Advance*")
{
$url
$wp.WebBrowsableObject.Title
}
}
}
}