Solved

Exchange Email Box reporting

Posted on 2009-04-15
5
534 Views
Last Modified: 2013-12-19
I am in need of some way that i can Do a report on the Exchange Server and See what users in in What mail store, as well as how big is their mail store. and put this into an excell spreadsheet

Is this possible ?
0
Comment
Question by:navajo26354
[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
  • 2
5 Comments
 
LVL 71

Expert Comment

by:Chris Dent
ID: 24155555

But of course :)

But, hmm spreadsheets. I'm developing a bit of a hatred of scripting into Excel, CSV files okay? It'll still open with Excel and is far easier to write to ;)

And which version of Exchange are we talking about? There's no consistency, we would use different methods for every single version (2000 / 2003 / 2007).

Chris
0
 

Author Comment

by:navajo26354
ID: 24162674
Exchange 2003
0
 
LVL 71

Accepted Solution

by:
Chris Dent earned 500 total points
ID: 24162766

Then our best bet is WMI. How do you feel about a little bit of PowerShell? You'd need to grab it from here:

http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx

It's useful to get a bit familiar with it, if you end up upgrading to Exchange 2007 you'll find you use PowerShell rather a lot.

Once you have that, you can potentially use my script here (attached as a code snippet at the bottom for convenience):

http://www.highorbit.co.uk/?p=871

Simply open up PowerShell, and paste Get-2003MailboxStatistics into the prompt. Then it can be used to get all of the information Exchange can give you about the mailboxes.

PowerShell does not have to be installed on the Exchange Server itself, you could install it on your workstation or anywhere else. However, you'll need to be running PowerShell as an Exchange admin to be able to use the script (Run As will do).

Once it's all pasted in, you can run this command in the shell:

Get-2003MailboxStatistics -Server "ExchangeServer02"

And it will generate a report from your server. That can be exported to a CSV file with:

Get-2003MailboxStatistics -Server "ExchangeServer02" | Export-CSV "MailReport.csv"

And finally from there opened up in Excel.

HTH

Chris
function Get-2003MailboxStatistics {
  Param(
     [String]$Identity = "",
     [String]$Server = $Env:ComputerName,
     [String]$Database = ""
  )
 
  $Filter = "ServerName='$Server'"
  if ($Database -ne "" ) { 
    $Filter = "$Filter AND StoreName='$Database'"
  }
  if ($Identity -ne "") {
    $Filter = "$Filter AND (MailboxGuid='{$Identity}' OR LegacyDN='$Identity'"
    $Filter = "$Filter OR MailboxDisplayName='$Identity')"
  }
 
  $MailboxStatistics = `
    Get-WMIObject -ComputerName $Server `
      -Namespace "root/MicrosoftExchangeV2" -Class "Exchange_Mailbox" `
      -Filter $Filter | `
    Select-Object `
      AssocContentCount, `
      @{n='DateDiscoveredAbsentInDs';e={ if ($_.DateDiscoveredAbsentInDs -ne $Null) { `
        [System.Management.ManagementDateTimeConverter]::ToDateTime(`
          $_.DateDiscoveredAbsentInDs)}} }, `
      MailboxDisplayName, TotalItems, LastLoggedOnUserAccount, `
      @{n='LastLogonTime';e={ if ($_.LastLogonTime -ne $Null) { `
        [System.Management.ManagementDateTimeConverter]::ToDateTime($_.LastLogonTime)}} }, `
      @{n='LastLogoffTime';e={ if ($_.LastLogoffTime -ne $Null) { `
        [System.Management.ManagementDateTimeConverter]::ToDateTime($_.LastLogoffTime)}} }, `
      LegacyDN, `
      @{n='MailboxGuid';e={ ([String]$_.MailboxGuid).ToLower() -Replace "\{|\}" }}, `
      @{n='ObjectClass';e={ "Mailbox" }}, `
      @{n='StorageLimitStatus';e={ `
        Switch ($_.StorageLimitInfo) {
          1 { "BelowLimit" }
          2 { "IssueWarning" }
          4 { "ProhibitSend" }
          8 { "NoChecking" }
          16 { "MailboxDisabled" } }} }, `
      DeletedMessageSize, Size, `
      @{n='Database';e={ "$($_.ServerName)\$($_.StorageGroupName)\$($_.StoreName)" }}, `
      ServerName, StorageGroupName, StoreName, `
      @{n='Identity';e={ ([String]$_.MailboxGuid).ToLower() -Replace "\{|\}" }}
 
  Return $MailboxStatistics
}

Open in new window

0
 

Author Closing Comment

by:navajo26354
ID: 31570536
sorry for delay got really busy
0
 
LVL 11

Expert Comment

by:bsharath
ID: 25849893
0

Featured Post

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

This article explains the steps required to use the default Photos screensaver to display branding/corporate images
A company’s centralized system that manages user data, security, and distributed resources is often a focus of criminal attention. Active Directory (AD) is no exception. In truth, it’s even more likely to be targeted due to the number of companies …
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

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