Solved

Mailbox report

Posted on 2014-02-25
6
183 Views
Last Modified: 2014-02-28
Hi,

I am looking for a script which tell the users what is thier mailbox size on daily basis.

Note : there is no quota set for any of the user in our company, we are using exchange 2010

Thanks in advance
0
Comment
Question by:alabkrishnan
  • 3
  • 3
6 Comments
 
LVL 3

Assisted Solution

by:Winsoup
Winsoup earned 500 total points
ID: 39895982
Are you trying to notify them all individually? I don't know of a very good way to do that without creating a ton of individual scripts.  
If you want to get all mailbox sizes and have it put into a CSV you can do that. I can get you a powershell script for that.
Then just create a task to have it emailed to everyone.
Everyone would be able to see each others mailbox sizes this way though. Not that it's some big secret or something but I'm not sure what your original plan was.
0
 
LVL 1

Author Comment

by:alabkrishnan
ID: 39896019
my management want to have the mailbox size to send it to the individual users.

We told them to do a quota settings since they are higher menagement they dont wnat to give them warining, they are only handful of people if you tell me how to script individual users and send email i can do that for those users.

Thanks for helping me, im a learner in powershell.

Regards,
Bala
0
 
LVL 3

Assisted Solution

by:Winsoup
Winsoup earned 500 total points
ID: 39896149
This script will work for an individual user. Just replace "user@domain.com with whatever you want. You can also change C:\Size.csv to whatever name and location you want to save it to.


function Load_Exchange_Tools {
      if (-not (Get-pssnapin | ? {$_.name -like 'Microsoft.Exchange.Management.PowerShell.e2010'})) {
            Add-PSSnapin Microsoft.Exchange.Management.PowerShell.e2010
      }
}
Load_Exchange_Tools
Get-Mailbox "user@domain.com" -ResultSize Unlimited | Get-MailboxStatistics | Select DisplayName,StorageLimitStatus,@{name="TotalItemSize (MB)";expression={[math]::Round((($_.TotalItemSize.Value.ToString()).Split("(")[1].Split(" ")[0].Replace(",","")/1MB),2)}},@{name="TotalDeletedItemSize (MB)";expression={[math]::Round((($_.TotalDeletedItemSize.Value.ToString()).Split("(")[1].Split(" ")[0].Replace(",","")/1MB),2)}},ItemCount,DeletedItemCount | Sort "TotalItemSize (MB)" -Descending | Export-CSV "C:\Size.csv" -NoTypeInformation


I would take that and save it as a .ps1, then create a task in task scheduler and set it to run every day at whatever time you want. Then, I'd create another task to send that file it creates as an email at whatever time you want.

Your task "action" should look like this:

Program\Script would be:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

Action would be:
C:\Size.ps1 (or wherever you deicide to save this script.

Once you have that set up, run and make sure it puts a CSV file on the C drive with the info for the user you entered. Once you have that working then create the task to email it to the user.

Let me know if something doesn't make sense. It's a little much to explain on here.


Side note: you can create a quota and just take upper management out of that quota policy if they don't want to be part of it.
0
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
LVL 1

Author Comment

by:alabkrishnan
ID: 39896190
Thanks for helping me out, i will test and keep you posted the updates on monday.

Have a good week end.
0
 
LVL 1

Author Comment

by:alabkrishnan
ID: 39896504
I've requested that this question be closed as follows:

Accepted answer: 0 points for alabkrishnan's comment #a39896019

for the following reason:

He is awsome
0
 
LVL 3

Accepted Solution

by:
Winsoup earned 500 total points
ID: 39896432
Did that work for you? Can you please accept an answer that worked if this was it?
Thanks.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone 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

A high-level exploration of how our ever-increasing access to information has changed the way we do our jobs.
It’s a strangely common occurrence that when you send someone their login details for a system, they can’t get in. This article will help you understand why it happens, and what you can do about it.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
In this Experts Exchange video Micro Tutorial, I'm going to show how small business owners who use Google Apps can save money by setting up what is called a catch-all email address in their Gmail accounts. By using the catch-all feature, small busin…

763 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