PowerShell: OneDrive exact storage used

%3CLINGO-SUB%20id%3D%22lingo-sub-2894374%22%20slang%3D%22en-US%22%3EPowerShell%3A%20OneDrive%20exact%20storage%20used%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2894374%22%20slang%3D%22en-US%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CP%3EHello%20community!%3CBR%20%2F%3EI%20need%20to%20extract%20a%20report%20about%20OneDrive%20current%20storage%20usage.%3C%2FP%3E%3CP%3EI%20run%20following%20simply%20script%3A%3C%2FP%3E%3CP%3EGet-SPOSite%20-Identity%20xxxxxxxx%20%7C%20select%20StorageUsageCurrent%3C%2FP%3E%3CP%3EThe%20problem%20is%2C%20that%20by%20users%2C%20that%20have%20no%20data%20on%20OneDrive%20(I%20see%20in%20admin%20console%2C%20that%20the%20usage%20is%200)%2C%20the%20report%20shows%201MB.%3CBR%20%2F%3EAs%20SPOService%20has%20no%20ItemCount%20propertie%2C%20I%20have%20to%20be%20sure%2C%20if%20there%20are%20some%20data%20on%20the%20OneDrive%20Site%20or%20not%20and%20I%20have%20to%20do%20it%20for%20over%203000%20users.%3C%2FP%3E%3CP%3EAny%20idea%2C%20how%20to%20solve%20it%3F%3C%2FP%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2894374%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOneDrive%20for%20Business%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

Hello community!
I need to extract a report about OneDrive current storage usage.

I run following simply script:

Get-SPOSite -Identity xxxxxxxx | select StorageUsageCurrent

The problem is, that by users, that have no data on OneDrive (I see in admin console, that the usage is 0), the report shows 1MB.
As SPOService has no ItemCount propertie, I have to be sure, if there are some data on the OneDrive Site or not and I have to do it for over 3000 users.

Any idea, how to solve it?

0 Replies