How i can get the total size for all our site collections including OneDrive sites
-
18-02-2021 - |
Domanda
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
Soluzione
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.
- Click on Settings gear and then select Site Settings
- In the "Site Settings" page, under "Site Collection Administration", click on Storage Metrics
To convert 25600 GB to MB, multiply with 1024 (1 GB = 1024 MB), which gives 26214400 MB
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
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange