Forum Discussion
Please help change my output to GB units only.
- May 24, 2020
Remove .Value, you don't need it as the data is already returned as string. And you want to use Name instead of DisplayName
Get-MailboxFolderStatistics bob@domain.com | select-object Name, @{name="FolderSize (GB)";expression={[math]::Round((($_.FolderSize).Split("(")[1].Split(" ")[0].Replace(",","")/1GB),2)}} | export-csv c:\bob.csv
Remove .Value, you don't need it as the data is already returned as string. And you want to use Name instead of DisplayName
Get-MailboxFolderStatistics bob@domain.com | select-object Name, @{name="FolderSize (GB)";expression={[math]::Round((($_.FolderSize).Split("(")[1].Split(" ")[0].Replace(",","")/1GB),2)}} | export-csv c:\bob.csv
- Boe DillardMay 24, 2020Iron Contributor
Wonderful job - thank you!!!!
I don't want to create a lot of work for you but is there an easy way to have it only list folders that are over 1GB? This user has about 50 folders and while I can sort by size in excel it would be useful if I had to do a lot of these if only the 1gb or larger ones showed.