Solved

Trying to export PS results to CSV

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

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Article by: Leon
Software Metering within our group of companies has always been an afterthought until auditing of software and licensing became a pain point. Orchestrator and SCCM metering gave us the answer and it was an exciting process.
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

746 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now