I'll preface this by saying my Powershell knowledge is fairly minimal and this is my first time trying to use PnP, so if there's something about my approach that seems off, please let me know. Currently have a new client with around 500 document libraries that are stored in a subsite (https://clientname.sharepoint.com/clients) that is under the default team site. The goal is to consolidate the files in these libraries within a single new library in a new site (https://clientname.sharepoint.com/sites/companyweb). Currently I'm having issues querying any of the libraries in the subsite via PnP. When I run get-pnplist -identity "https://clientname.sharepoint.com/Clients/libraryname
or get-pnplist -identity "https://clientname.sharepoint.com/Clients"
, I get no output. When I run this code while connected to the base site
$webs=Get-PnPSubWebs -Recurse
foreach($web in $webs)
{
write-host $web.Url -ForegroundColor Cyan
$sublists = Get-PnPList -web $web
$sublists
}
It does output the expected library names and URLs as expected. Could there be something about the URL formatting that I'm missing?