All I'm trying to do is scan a site collection and have it return which masterpages are being used for all my sites, sub-sites and pages in a SharePoint online environment.
Any suggestions would be very welcome. Because this is for SharePoint online I can use regular SPO commands and I have also loaded PnP on to the management shell.
I'm aware of Get-SPOSite and found a page here that builds a SPOWeb object
I'm pretty new to Powershell so any help would be great.
Basically the script would iterate through each site and page in the collection and tell me which master page is used in each