Skip to content
This repository has been archived by the owner on Jan 5, 2022. It is now read-only.

Scheduling #5

Open
wants to merge 53 commits into
base: master
Choose a base branch
from
Open

Scheduling #5

wants to merge 53 commits into from

Conversation

Blockagle
Copy link
Collaborator

fixes #2
Adds 2 private functions and 1 public function.

Get-OutlookCalendarAppointments returns a object for each meeting it finds in Outlook between specified dates.

The object returned has these properties

MeetingTime MeetingSubject MeetingURL Recurring MeetingBody
Type: Datetime Type: String Type: String Type: Bool Type: String
The date/time of a matched meeting The subject of the meeting The zoom URL scraped from the meeting body Is the meeting a calculated recurrence The full body of the meeting object

The returned objects can be piped into Start-ZoomMeeting or Add-ZoomMeeting

Blockagle added 30 commits May 11, 2020 22:45
Removed parameter types
Default to 48 hours ahead if not dates specified
removed parameter type enforcement for end date
Use the Matches and Value properties of  Select-String Object
@Blockagle Blockagle added the enhancement New feature or request label May 21, 2020
@Blockagle
Copy link
Collaborator Author

Merged Master into Branch to sync updates. Ready for review and merging

ZoomZoom/Private/Get-RecurringMeetingDates.ps1 Outdated Show resolved Hide resolved
ZoomZoom/Private/Get-RecurringMeetingDates.ps1 Outdated Show resolved Hide resolved
ZoomZoom/Private/Get-DaysInRange.ps1 Outdated Show resolved Hide resolved
ZoomZoom/Private/Get-DaysInRange.ps1 Outdated Show resolved Hide resolved
ZoomZoom/Public/Get-OutlookCalendarAppointment.ps1 Outdated Show resolved Hide resolved
ZoomZoom/Private/Get-ZoomStringFromBody.ps1 Outdated Show resolved Hide resolved
ZoomZoom/Private/Get-ZoomStringFromBody.ps1 Outdated Show resolved Hide resolved
ZoomZoom/Private/Get-ZoomStringFromBody.ps1 Outdated Show resolved Hide resolved
ZoomZoom/Private/Get-ZoomStringFromBody.ps1 Outdated Show resolved Hide resolved
ZoomZoom/Private/Get-ZoomStringFromBody.ps1 Outdated Show resolved Hide resolved
ZoomZoom/Private/Get-DaysInRange.ps1 Outdated Show resolved Hide resolved
.SYNOPSIS
Returns the days, months, and years of all days between 2 days
.DESCRIPTION
Calculates a timespan between 2 dates, then returns each day between those 2 dates as datetime objects
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it inclusive or exclusive?

1-3 inclusive returns 1, 2, and 3
1-3 exclusive returns 2

ZoomZoom/Private/Get-DaysInRange.ps1 Outdated Show resolved Hide resolved
ZoomZoom/Private/Get-DaysInRange.ps1 Outdated Show resolved Hide resolved
$DateArray += Get-Date $StartDate
$WorkingTime = Get-Date $StartDate
foreach ($_ in 1..$Timespan.Days) {
$WorkingTime = $WorkingTime.AddDays(1)
Copy link
Owner

@Mortein Mortein May 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only returns 2nd day and beyond, never the 1st.

$AppointmentDates += (Get-RecurringMeetingDates -Appointment $Appointment -EndDate (Get-Date $End).ToString()).AppointmentDates
foreach ($Date in $AppointmentDates) {
if ($Date -gt (Get-Date $Start)) {
$Results += [pscustomobject]@{
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if you take 95-98 and move it to this foreach (inside the if on 83), and then pass to the pipeline after you've set the properties?

Will PowerShell care if you pass an object with default display set, rather than an array of objects with default display set? I have a feeling it'll just merge the objects, as long as the display set is the same.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add meetings from Outlook
2 participants