This blog is by design...

Wednesday, August 17, 2005

List Exchange 2003 Mailbox Information

The following script is a small modification on the MS script posted here: List Exchange Mailbox Information
This simply causes the script to output the information to a text file rather than echoing it to the screen. If you need historical tracking, or mailbox growth tracking, I believe Glen Scales has an excellent script for such things on his Blog, but then again, all his scripts and programs are excellent IMHO.


'**************************************************
On Error Resume Next
'Written to a file instead of Echoed on the screen

set objReadFSO = CreateObject ("Scripting.FileSystemObject")
set objOutputFile = objReadFSO.CreateTextFile("c:\Mailboxes.txt")

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & _
"\ROOT\MicrosoftExchangeV2")

Set colItems = objWMIService.ExecQuery _
("Select * from Exchange_Mailbox")

For Each objItem in colItems
objOutputFile.Writeline "Associated content count: " & _
objItem.AssocContentCount

objOutputFile.Writeline "Date discovered absent in DS: " & _
objItem.DateDiscoveredAbsentInDS

objOutputFile.Writeline "Delete messages size extended: " & _
objItem.DeletedMessageSizeExtended

objOutputFile.Writeline "Last logged-on user account: " & _
objItem.LastLoggedOnUserAccount

objOutputFile.Writeline "Last logoff time: " & _
objItem.LastLogoffTime

objOutputFile.Writeline "Last logon time: " & _
objItem.LastLogonTime

objOutputFile.Writeline "Legacy distinguished name: " & _
objItem.LegacyDN

objOutputFile.Writeline "Mailbox display name: " & _
objItem.MailboxDisplayName

objOutputFile.Writeline "Mailbox GUID: " & _
objItem.MailboxGUID

objOutputFile.Writeline "Server name: " & _
objItem.ServerName

objOutputFile.Writeline "Size: " & _
objItem.Size

objOutputFile.Writeline "Storage group name: " & _
objItem.StorageGroupName

objOutputFile.Writeline "Storage limit information: " & _
objItem.StorageLimitInfo

objOutputFile.Writeline "Store name: " & _
objItem.StoreName

objOutputFile.Writeline "Total items: " & _
objItem.TotalItems

objOutputFile.Writeline

Next

objOutputFile.Close

set objReadFSO = Nothing
set objOutputFile = Nothing
Set objWMIService = Nothing
Set colItems = Nothing

Wscript.Echo "All Done"

12 Comments:

  • Hello,

    Look for an exchange script which does enumerates all storage group with my domain and displays

    1. Storage group name
    2. EDB size
    3. STM size
    4. Number of mailboxes per storage group

    All exported to an excel spreadsheet... I know Glenn has a script similar but i need to to be exported to excel...can u assist

    By Anonymous Anonymous, at 12:01 AM  

  • To say the truth I had many troubles with MS Exchange but only some days ago I overcomed theirs. In this matter I was helped one tool. It made all easily and this program might be the same in this proposition as well - exchange recovery.

    By Blogger Alex, at 9:36 AM  

  • Thanks, script is great !!!

    By Blogger Kim Tran Gia, at 11:05 PM  

  • This website was... how do you say it? Relevant!! Finally I've found something that helped me. Thanks!
    Look into my web-site ; wiki.rt74.eu

    By Anonymous Anonymous, at 4:01 PM  

  • Highly descriptive post, I liked that bit. Will there be a part 2?
    my webpage - http://www.fanclub.asalettfilms.com

    By Anonymous Anonymous, at 2:46 PM  

  • I visited multiple web pages however the audio feature for audio songs existing at this web page is in fact wonderful.
    Feel free to visit my webpage http://www.uaz-portal.de

    By Anonymous Anonymous, at 5:31 AM  

  • We stumbled over here coming from a different page and thought I might as well check things out.
    I like what I see so i am just following you.

    Look forward to exploring your web page for a second time.



    Stop by my web page ... beauty salon products

    By Anonymous Anonymous, at 5:34 PM  

  • Hello there, just became aware of your blog through Google, and found that it's really informative. I'm going to watch
    out for brussels. I'll be grateful if you continue this in future. A lot of people will be benefited from your writing. Cheers!

    Take a look at my blog: www.backpackerproject.net
    Also see my site: increase traffic

    By Anonymous Anonymous, at 2:00 PM  

  • A fascinating discussion is definitely worth comment.
    I think that you need to publish more on this topic, it may not
    be a taboo matter but generally people do not discuss these topics.
    To the next! Cheers!!

    my site ... smoking cessation benefits

    By Anonymous Anonymous, at 7:07 PM  

  • This is a topic that's near to my heart... Cheers! Exactly where are your contact details though?

    Feel free to visit my web-site; quit smoking

    By Anonymous Anonymous, at 3:13 PM  

  • Write more, thats all I have to say. Literally, it
    seems as though you relied on the video to make your point.
    You obviously know what youre talking about, why throw away your intelligence on just posting videos to your blog when you could be
    giving us something informative to read?

    Here is my web site ... http://nguoitanhoi.com

    By Anonymous Anonymous, at 7:47 AM  

  • We are a group of volunteers and starting a new scheme in our
    community. Your site offered us with valuable information to work on.
    You have done an impressive job and our entire community will be grateful to you.


    Feel free to surf to my homepage; http://Myinsanestories.com/trendy-clothing-that-introduces-the-strong-bohemian-style.html

    By Anonymous Anonymous, at 2:11 AM  

Post a Comment

<< Home