Try to use SharePoint PnP to get all the sites on a SharePoint 2013 server.

From central administration, I can view all site collections as

```
/
/people/A
/people/B
...

```

The site urls are like

```
https://people-hr.mycompany.com
https://people-hr.mycompany.com/A/JohnAllen
https://people-hr.mycompany.com/A/SamAdams
https://people.hr.mycompany.com/B/JamesBell
...

```

Using

```
Connect-PnPOnline -Url "https://products.mycompany.com" -Credentials (Get-Credential)
or
Connect-PnPOnline -Url "https://products.mycompany.com/A/JohnAllen" -Credentials (Get-Credential)

```

I can get to the root site or a subsite. But there are so many sites. I need to get all the sites so I can iterate them to do some data maintenance.

I tried to use Get-PnPSite and Get-PnPSubWebs (with Recurse), but they failed to return all the sites.