This is a supporting blog post for an example PowerShell script I quickly wrote for Microsoft’s Office 365 SharePoint Online. It was created after a query was posted on the Project Online TechNet forums asking how to easily check what sub sites were being used in PWA.
The code sample can be downloaded from here: https://gallery.technet.microsoft.com/Get-item-count-from-all-026a6db2
To get the script to work, there will need to be some environment variables set and a DLL available, these are detailed below.
Update the environment details:
Add the SharePoint Online / PWA URL, username and password for an account that is a site collection admin on the target site collection.
To get the script to work you will need to reference the DLL as seen in the image below:
This can be installed from the SharePoint Online Client components / management shell. I used the dll from the SharePoint Online Management Shell in this example.
Below you can see the output from the PowerShell ISE when running against my test SharePoint / Project Online site collection:
There are probably easier ways to view this information but I thought I would just try with a simple PowerShell script.