Solved

Trying to export PS results to CSV

Posted on 2013-05-15
2
353 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This collection of functions covers all the normal rounding methods of just about any numeric value.
Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
Viewers will learn how to maximize accessibility options in an Excel workbook for users with accessibility issues.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…

695 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