Exporting Powershell to formatted CSV file


hello

running powershell v2. have following command pulls mailbox name , sizes list of users.

when exports csv, data not formatted properly. i'd have display name , mailbox size in seperate columns on csv file doesn't seem possible? when data exported appears in same column?

get-content c:\list.txt | get-mailbox | foreach-object {get-mailboxstatistics -identity $_} | fl displayname, @{ expression={$_.totalitemsize.value.tomb()}} > c:\export.csv

  select displayname, @{ expression={$_.totalitemsize.value.tomb()}} | export-csv  c:\export.csv  



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Motherboard replacement

Cannot create Full Text Search catalog after upgrading to V12 - Database is not fully started up or it is not in an ONLINE state

Remote Desktop App - Error 0x207 or 0x607