locked
Trying to Find Mailbox Size, User Name and Last Logon Time and Date RRS feed

  • Question

  • Hi all,

    I'm looking to get the following information off a Windows Exchange 2003 Server:

    User Name, Mailbox Size and last logon date and time (or better yet -- last active logon from 50 days ago).

    We only have PowerShell v1 available to us.

    Can someone help me write a powershell script for the following variables or maybe a dsquery to find the above?  Any help would be greatly appreciated.

    Friday, March 28, 2014 3:13 PM

Answers

All replies

  • You really should upgrade.  Exchange cmdlets in Exchange 2010 are much simpler to use than using WMI through PowerShell.
    Friday, March 28, 2014 5:43 PM
  • Hi,

    You can refer to the scripts described in the following article:

    http://social.technet.microsoft.com/Forums/en-US/d68cb8c4-2f82-4c31-9395-cc5091144bef/exchange-2003-item-counts-with-powershell?forum=ITCG

    Thanks,

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com


    Simon Wu
    TechNet Community Support

    Monday, March 31, 2014 6:39 AM
    Moderator
  • Try the below Get-MailboxStatistics cmdlet :

    Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label="TotalItemSize(KB)";expression={$_.TotalItemSize.Value.ToKB()}},ItemCount,LastLogonTime,LastLoggedOnUserAccount,ObjectClass,ServerName

    Moreover, you could try this tool to get Mailbox Statistics report from Exchange Server 2003.

    Monday, March 31, 2014 10:27 AM
  • JhonH, I think you missed the part where he said he had Exchange 2003.  Even if he installs an Exchange 2010 server (which would give him access to the directory information), he can't pull the mailbox statistics on the Exchange 2003 mailboxes with the Exchange 2010 commands.
    Monday, March 31, 2014 11:51 AM
  • Sure you can. Use WMI and ADSI.

    http://msdn.microsoft.com/en-us/library/ms876479(v=exchg.65).aspx


    --- Rich Matheisen MCSE&I, Exchange MVP

    Tuesday, April 1, 2014 2:08 AM
  • Yes, WMI will allow it, but "Get-MailboxStatistics" without WMI won't.
    Tuesday, April 1, 2014 5:19 PM
  • I'm not sure what point you're trying to make. Get-MailboxStatistics is a cmdlet. He doesn't have Exchange 2007, 2010, or 2013 installed so there aren't any Exchange cmdlets available to be used. All he has is VBS, and Powershell.

    WMI, OTOH, was used to gather this information prior to the release of Exchange 2007. The Powershell Get-WMIObject cmdlet's available for him to use, so using it is the way to get the information he wants.

    These WMI properties contain the information he asked for:

    MailboxDisplayName
    LastLogonTime
    Size


    --- Rich Matheisen MCSE&I, Exchange MVP

    Tuesday, April 1, 2014 10:02 PM
  • Hi,

    Is there any update on this thread?

    Thanks,

    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com


    Simon Wu
    TechNet Community Support

    Wednesday, April 2, 2014 1:43 AM
    Moderator
  • Rich, we just need to agree that WMI will do this and the Exchange cmdlets that JhonH suggest he use won't (I was saying the latter).
    Wednesday, April 2, 2014 11:40 AM
  • I don't think we're disagreeing at all, except that you didn't qualify your answer to say that there are no Exchange cmdlets for Exchange 2003.

    Your statement, as it stands, simply isn't true:

    "You can't do anything with PowerShell and Exchange 2003."


    --- Rich Matheisen MCSE&I, Exchange MVP

    Wednesday, April 2, 2014 9:34 PM
  • You are absolutely correct, and I will modify my original statement ...  Thanks.  (-:
    Thursday, April 3, 2014 12:41 PM