Trying to loop through the site collection to get all sites:
$site=Get-SPSite $Url
$list = $site.Allwebs | ForEach { $_.Lists } | ForEach-Object -Process
{$_.Items}| ForEach-Object -Process {$_.web.url.Replace(" ","%20") + "/" +
$_.url.Replace(" ","%20")}
It works for some site collection, but some site collection return 0 sites.
when we try to run $list = $site.Allwebs for those SC, it return nothing.
Any idea?