Solved

Trying to export PS results to CSV

Posted on 2013-05-15
2
347 Views
Last Modified: 2013-05-16
Hi, Trying to push the below script to CSV, please help'



get-mailbox | Get-MailboxStatistics |

Select Displayname,ItemCount,

@{Name="SizeKB";Expression={$_.totalItemSize.Value.toKB()}} |

Sort SizeKB -Descending | Format-Table –auto | >c:\temp\All_Mailboxes_Sizes.csv -notype
0
Comment
Question by:Agilityapps
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 22

Accepted Solution

by:
Haresh Nikumbh earned 500 total points
ID: 39170956
try this


Get-MailboxStatistics | Sort TotalItemsize -Descending | select DisplayName, ItemCount, @{name="TotalItemSize(KB)";expression={$_.totalitemsize.value.ToKB()}}, storagegroupname | Export-Csv c:\report.csv -notype
0
 

Author Comment

by:Agilityapps
ID: 39173168
Thanks, worked a treat.
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I wanted to share this with fellow Experts, who might not know. How often have you wanted to learn something, only to be set back by either restrictions imposed on "trial" or "evaluation" software?  How often have you had to rebuild a home networ…
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
Viewers will learn how to maximize accessibility options in an Excel workbook for users with accessibility issues.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question