# User Meeting Information

**URL:** <https://forums.powershell.org/t/user-meeting-information/19907>\
**Category:** PowerShell Help\
**Created:** [July 15, 2022, 3:16pm UTC](https://forums.powershell.org/t/user-meeting-information/19907 "2022-07-15T15:16:41Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![brad-sam](https://avatars.discourse-cdn.com/v4/letter/b/258eb7/32.png) [@brad-sam](https://forums.powershell.org/u/brad-sam)\
**Post date:** [July 15, 2022, 3:16pm UTC](https://forums.powershell.org/t/user-meeting-information/19907/1 "2022-07-15T15:16:41Z")

</div>

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:

```auto
$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

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [July 15, 2022, 4:17pm UTC](https://forums.powershell.org/t/user-meeting-information/19907/2 "2022-07-15T16:17:17Z")

</div>

> [@brad-sam](#):
>
> i trying to collect meeting information for all company for specific time frame and extract report to csv

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.

---

<div class="post-metadata">

**Author:** ![brad-sam](https://avatars.discourse-cdn.com/v4/letter/b/258eb7/32.png) [@brad-sam](https://forums.powershell.org/u/brad-sam)\
**Post date:** [July 15, 2022, 4:22pm UTC](https://forums.powershell.org/t/user-meeting-information/19907/3 "2022-07-15T16:22:30Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [July 15, 2022, 4:40pm UTC](https://forums.powershell.org/t/user-meeting-information/19907/4 "2022-07-15T16:40:23Z")

</div>

I’m sorry. Since I have very limitted experiences with Exchange I don’t know. 🤷🏽‍♂️

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

---

<div class="post-metadata">

**Author:** ![brad-sam](https://avatars.discourse-cdn.com/v4/letter/b/258eb7/32.png) [@brad-sam](https://forums.powershell.org/u/brad-sam)\
**Post date:** [July 15, 2022, 5:16pm UTC](https://forums.powershell.org/t/user-meeting-information/19907/5 "2022-07-15T17:16:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![random-commandline](https://avatars.discourse-cdn.com/v4/letter/r/e56c9b/32.png) [@random-commandline](https://forums.powershell.org/u/random-commandline)\
**Post date:** [July 15, 2022, 8:32pm UTC](https://forums.powershell.org/t/user-meeting-information/19907/6 "2022-07-15T20:32:42Z")

</div>

```auto
# 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'
}

```

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [July 15, 2022, 8:43pm UTC](https://forums.powershell.org/t/user-meeting-information/19907/7 "2022-07-15T20:43:38Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![brad-sam](https://avatars.discourse-cdn.com/v4/letter/b/258eb7/32.png) [@brad-sam](https://forums.powershell.org/u/brad-sam)\
**Post date:** [July 15, 2022, 8:54pm UTC](https://forums.powershell.org/t/user-meeting-information/19907/8 "2022-07-15T20:54:39Z")

</div>

Thank you Olaf for

```auto
$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:

> **[Get-CalendarDiagnosticObjects (ExchangePowerShell)](https://docs.microsoft.com/en-us/powershell/module/exchange/get-calendardiagnosticobjects?view=exchange-ps)**
>
> Some of the more interesting properties that are returned in the results are: AppointmentState: 1 = The appointment is a meeting, 2 = The appointment has been received, 4 = The appointment has been cancelled, and 8 = the appointment is a forwarded...

Thank you for your help!

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [July 15, 2022, 8:57pm UTC](https://forums.powershell.org/t/user-meeting-information/19907/9 "2022-07-15T20:57:53Z")

</div>

> [@brad-sam](#):
>
> Thank you Olaf for

That’s not from me. 👆🏽 But I’m sure @random-commandline is glad to hear that you like it. 😉

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

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:17pm UTC](https://forums.powershell.org/t/user-meeting-information/19907/10 "2024-05-16T20:17:44Z")

</div>


