User Meeting Information

Hello everyone!
i trying to collect meeting information for all company for specific time frame and extract report to csv
This is my simple code:

$alluseremails = Import-CSV -Path "C:\Emails.csv"

ForEach ($email in $alluseremails.DisplayName)
{
(Get-CalendarDiagnosticObjects -Identity $email -StartDate 7/10/2022 -EndDate 7/17/2022 -ResultSize Unlimited ) |
Select SubjectProperty, StartTime, EndTime, OriginalParentDisplayName | 
Where-object OriginalParentDisplayName -eq Calendar 
}

look like its working, but in some reason the time frame part not working correct and if i run this command just for one user , in report i can see meeting information from previos year and some meeting information from this yer but other monthes

Hope somebady can help me with this

Thanks

I’m not sure if it works as you might think it does.

How I understand the help for the cmdlet Get-CalendarDiagnosticObjects you specify with -StartDate and -EndDate the time the calendar entry has been last modified - not the date and time of a meeting.

So for example when you created a calender entry 4 weeks ago with a meeting for today you wouldn’t get it at all using your query from your question.

Hi Olaf,

as always Thank you for your help
but then how i can get data just for one week the report should show user’s meetings just for one week

Thanks

I’m sorry. Since I have very limitted experiences with Exchange I don’t know. :man_shrugging:t4:

I just wanted you to be aware of that you might waste your time using the wrong tool for the job. :wink:

Thank you Olaf,
and do you haev any sugestions what i can use to collect all meeting information
and also how i can export all data in scv, because for now if i run my script “as is” its not collecting all data, its overiting data for each user

Thanks

# I don't have an Exhange environment to test, but try this.  
# Where-Object shouldn't be after Select-Object.

$alluseremails = Import-CSV -Path "C:\Emails.csv"
foreach ($email in $alluseremails.DisplayName){   
    $calprop = @{
        Identity = $email 
        StartDate = '7/10/2022' 
        EndDate = '7/17/2022' 
        ResultSize = 'Unlimited'
    }
    Get-CalendarDiagnosticObjects @calprop |
    Where-object {$_.OriginalParentDisplayName -eq 'Calendar'} |
    Select-Object SubjectProperty,StartTime,EndTime,OriginalParentDisplayName | 
    Export-Csv -NoTypeInformation -Path 'C:\MeetingInfo.csv'
}
1 Like

OK, that looks much cleaner. But that does not change the fact that Get-CalendarDiagnosticObjects does not look into an appointment or meeting for the actual date and time. It just checks the lastWriteTime of the mailbox/calendar item. Or am I wrong?

Thank you Olaf for

$calprop = @{
        Identity = $email 
        StartDate = '7/10/2022' 
        EndDate = '7/17/2022' 
        ResultSize = 'Unlimited'
    }

this look much better
and from MS site Get-CalendarDiagnosticObjects have lot of properties:

Thank you for your help!

That’s not from me. :point_up_2:t4: But I’m sure @random-commandline is glad to hear that you like it. :wink:

You can give a reward by liking the answer and when an answer actually solves your issue you should mark it as the solution. :wink: