Solved

Mailbox report

Posted on 2014-02-25
6
177 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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In Q3 of last year, Experts Exchange introduced a new Messaging System, allowing any member to communicate directly with other members. During an especially long thread with a member, I wanted to go back to previous messages in the exchange to re…
I didn’t use eM Client for long when I decided to swap to Outlook 2016. The reason for the switch is that it started asking for payment to continue some of its services after one month.   The problems I faced when I didn’t pay were:   I was not …
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…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

744 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

13 Experts available now in Live!

Get 1:1 Help Now