Retrieve state of several exchange 2003 mailboxes calendar

Home Forums Scripting Windows Script Host Retrieve state of several exchange 2003 mailboxes calendar

This topic contains 1 reply, has 2 voices, and was last updated by Avatar ekrengel 9 years, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • Avatar
    tdbchess
    Participant
    #149807

    Hello everybody,

    I need to realize a script which is going to retrieve state of several calendars exchange 2003 mailboxes.
    (account AD with mailbox) since January 1st, 2010 so far and to send the data to a file csv, this with the aim of seeing the occupation rate of mailboxes which represent in fact meeting rooms).

    See what are the rooms which are the most occuped and those who are less. (calendar activity)

    Thanks

    Thomas

    Avatar
    ekrengel
    Member
    #279995

    Re: Retrieve state of several exchange 2003 mailboxes calendar

    tdbchess;209573 wrote:
    Hello everybody,

    I need to realize a script which is going to retrieve state of several calendars exchange 2003 mailboxes.
    (account AD with mailbox) since January 1st, 2010 so far and to send the data to a file csv, this with the aim of seeing the occupation rate of mailboxes which represent in fact meeting rooms).

    See what are the rooms which are the most occuped and those who are less. (calendar activity)

    Thanks

    Thomas

    Unfortunately, I have no idea what you are talking about :smile:

    But to view/dump data out of an exchange calendar…the only way I’ve seen is through a MAPI session (you will need MAPI enabled on your exchange server for this to work). The example below log’s into an exchange mailbox, and gets the information for each appointment:

    Set CDOSession = CreateObject(“MAPI.Session”)
    CDOSession.Logon , , , , , , “TESTEXSVR” & vbLf & “Sean”
    Set oFolder = CDOSession.GetDefaultFolder
    (CdoDefaultFolderCalendar)
    Set oMessages = oFolder.Messages

    Set oAppointment = oMessages.GetFirst
    Do While Not oAppointment Is Nothing
    MsgBox “Appointment: ” & oAppointment.Subject & vbCRLF & _
    “Start Time: ” oAppointment.StartTime & vbCRLF & _
    “End Time: ” oAppointment.EndTime & vbCRLF & _
    “Location: ” oAppointment.Location & vbCRLF & _
    “Description: ” oAppointment.Text & vbCRLF
    Set oAppointment = oMessages.GetNext
    Loop
    CDOSession.Logoff[/CODE]

    It is possible to be scripted to log into multiple selected mailboxes, and dump the data to a csv. You could do this:
    [LIST]
    [*]read from a text file or array of the mailboxes
    [*]loop through each mailbox
    [*]create sub to gather calendar info
    [*]dump csv data within the loop
    [/LIST][CODE]Set CDOSession = CreateObject(“MAPI.Session”)
    CDOSession.Logon , , , , , , “TESTEXSVR” & vbLf & “Sean”
    Set oFolder = CDOSession.GetDefaultFolder
    (CdoDefaultFolderCalendar)
    Set oMessages = oFolder.Messages

    Set oAppointment = oMessages.GetFirst
    Do While Not oAppointment Is Nothing
    MsgBox “Appointment: ” & oAppointment.Subject & vbCRLF & _
    “Start Time: ” oAppointment.StartTime & vbCRLF & _
    “End Time: ” oAppointment.EndTime & vbCRLF & _
    “Location: ” oAppointment.Location & vbCRLF & _
    “Description: ” oAppointment.Text & vbCRLF
    Set oAppointment = oMessages.GetNext
    Loop
    CDOSession.Logoff[/CODE]

    It is possible to be scripted to log into multiple selected mailboxes, and dump the data to a csv. You could do this:

    • read from a text file or array of the mailboxes
    • loop through each mailbox
    • create sub to gather calendar info
    • dump csv data within the loop
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

Register for this Petri Webinar!

Software-Defined Unlimited Backup Storage

Tuesday, August 27, 2019 @ 1:00 pm EDT

A Scale-Out Backup storage infrastructure is a must-have technology for your backups. In this webinar, join expert Rick Vanover for a look on what real-world problems are solved by the Scale-Out Backup Repository.

Register Now

Sponsored By