bruce_77
asked on
Exporting Powershell to formatted CSV file
Hello
Running Powershell v2. I have the following command that pulls mailbox name and sizes for a list of users.
But when it exports to CSV, the data is not formatted properly. What I'd like to do is have Display Name and Mailbox Size in seperate columns on the CSV file but this doesn't seem possible? When the data is exported it all appears in the same column?
Get-content c:\LIST.txt | Get-mailbox | Foreach-object {get-mailboxstatistics -identity $_} | fl displayname, @{ expression={$_.TotalItemSi ze.Value.T oMB()}} > c:\export.csv
Running Powershell v2. I have the following command that pulls mailbox name and sizes for a list of users.
But when it exports to CSV, the data is not formatted properly. What I'd like to do is have Display Name and Mailbox Size in seperate columns on the CSV file but this doesn't seem possible? When the data is exported it all appears in the same column?
Get-content c:\LIST.txt | Get-mailbox | Foreach-object {get-mailboxstatistics -identity $_} | fl displayname, @{ expression={$_.TotalItemSi
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks...
So what is the difference between using "| fl displayname" and "| select displayname"?
So what is the difference between using "| fl displayname" and "| select displayname"?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window