I am using below code to get lists of all subsites. But it is failing after one level of sitecollections. i cant connect with each web using Connect-PnPOnline as it takes too much time. Please suggest how to get lists of all subsites.
$webs= Get-PnPSubWebs -Recurse
foreach ($web in $webs)
{
write-host $web.Url -ForegroundColor Cyan
$sublists = Get-PnPList -web $web
}