Inventory of al SPOnline sites without access to SP Administrator

325 views Asked by At

I am the SPOnline Developer for my company. I do not have access to SP Admin console. I have been requested to produce a set of all SP sites and subsides, but I don't believe there is anyway to do this without being an administrator. I believe I could get this info if using PowerShell SPOnline if I had access to the Administrator, or someone with Admin privileges at my company could do this.

Anyway to do this without admin privileges?

1

There are 1 answers

0
Gautam Sheth On

I would suggest that you download and install the PnP PowerShell. It is wrapper on the OOTB SharePoint powershell but with much easier commandlets and ease of use.

After you download and install the PnP PowerShell, you can run the below commands:

Connect-PnPOnline -Url "<your-site-url>"

Get-PnPSiteSearchQueryResults -Query "(contentclass:'STS_Site') (contentclass:'STS_Web')" -All

After you run the command, Connect-PnPOnline -Url "<your-site-url>", it will open a window asking for credentials. If you provide your credentials, it will work in that context. If you provide admin credentials, it will work in admin context.

Get-PnPSiteSearchQueryResults submits a search query which is the fastest and most efficient way to get list of all the sites and subsites.

Do note, this will give the results of all the sites and subsites to which only you have access. If you run in the context of admin, then, if and only if the admin is added to that particular site will he have access to it.

References -

Dowload this file - SharePointPnPPowerShellOnline.msi for SharePoint online.

Download links (get the latest Nov 2017 or higher) - PnP-PowerShell

Documentation - Get-PnPSiteSearchQueryResults