Sort function in Powershell not working

Home Forums Scripting PowerShell Sort function in Powershell not working

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Avatar
    jason0923
    Participant
    #167073

    I’m trying to export a report in Office 365 of users online Archives. The export works but I want to be able to sort the data to make it easier to read. I’ve used the Sort-Object command vefore but now its not working and I get the data unsorted. Am I missing something simple? This is the command I am using

    Get-Mailbox -Resultsize unlimited -Filter {customattribute1 -eq “staff”} | Get-MailboxStatistics -archive -erroraction silentlycontinue | select DisplayName,TotalItemSize | Sort-object “TotalItemSize (MB)” -Descending | Export-CSV “C:user dataArchive.csv”

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.