i want to loop through all lists in all Site Collection and subsites in a SharePoint WebApplication and have Shell output only the files that end with .aspx. Here is my script so far:
$AllSites = Get-SPWebApplication https://contoso.de | Get-SPSite -Limit All | Get-SPWeb -Limit All
Foreach ($Site in $AllSites)
{
$Lists = $Site.Lists
Foreach ($List in $Lists)
{
$List.Items | ?
}
}
I have looked online for over a week but i couldn't manage to find out how to list only the items that end with .aspx
. I suppose it has to be after $List.Items where the question mark is. Can someone please help me figure out how to do this?