Get total one drive for business storage usage for list of users

This topic contains 1 reply, has 2 voices, and was last updated by Profile photo of random commandline random commandline 1 month ago.

  • Author
    Posts
  • #56804
    Profile photo of TheDL
    TheDL
    Participant

    Good day fellow powershell'ers. I have what I hope is a simple question. How do I get the total one drive for business storage used by a group of users? We can skip the basics...I am connected to O365/Sharepoint online, I am able to get the storage usage for a single user, and I have a CSV list of users I just don't know how to use the list to get thier total (or list of) one drive for business storage used?

  • #56815
    Profile photo of random commandline
    random commandline
    Participant

    I am not familiar with Office365 cmdlets, but something like this should work.

    $users = Get-Content \\path\to\userlist.csv
    $results = foreach ($user in $users){
            # Code to get $user storage usage
    }
    $results | Measure-Object -Property storage-property
    

You must be logged in to reply to this topic.