Question

I want to get the total size for all our SharePoint sites (including OneDrive sites), where i tried to run this PnP command:-

Get-PnPTenantSite -IncludeOneDriveSites -Detailed

but i could not get the size of the sites.. can anyone advice on this please? Thanks

Était-ce utile?

La solution

This works for me:

$sites =Get-PnPTenantSite -IncludeOneDriveSites

foreach($s in $sites)
{
  write-host "Usage:$($s.StorageUsage) MB `t MaxLevel:$($s.StorageMaximumLevel) MB `t Url:$($s.Url)"

} 

MS Doc reference

Updating to confirm PnP PowerShell returns values in MBs

To manually check the allocated quota follow steps 1 and 2.

  1. Click on Settings gear and then select Site Settings
  2. In the "Site Settings" page, under "Site Collection Administration", click on Storage Metrics

enter image description here

  1. To convert 25600 GB to MB, multiply with 1024 (1 GB = 1024 MB), which gives 26214400 MB

  2. Compare this with the PnP PS output value of StorageMaximumLevel, which in my case is MaxLevel:26214400 MB

Conclusion: PnP PowerShell returns Storage Metrics in MBs

Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top