How to get all subsites in sharepoint using powershell. If you run the script, an export will be created at the path, which you have specified. Before proceeding, install the latest PnP PowerShell module. First, we need to connect the Site collection with the PnP module to retrieve subsites. In this site collection I have many subsites and in every subsite I have other subsites. You will find a script for SharePoint Online and SharePoint Server. # PowerShell Script to get alerts from a site collection in SharePoint Online Feb 28, 2026 · In conclusion, the SharePoint Search problem can make it difficult to find important files, information, or data. The parent content type is Site Pages. Apr 9, 2019 · I know about "Get-SPWebApplication" but it's not available in Online. How can I get a list of all sites and subsites in SPO? I have a site collection "IM". Learn how to get all subsites in SharePoint Online using PowerShell and keep track of your site structure for proper organization. nebpl yzdy aquck siljn eqftx scoybzun ezwx fpwmi osrhh gnx