The Get-Calendar Cmdlet currently pretty-prints a specific month or year to the terminal, but something more useful than that would probably integrate data from Outlook or Gmail in some capacity. That way this new feature could emit an array of PowerShell object with the following properties:
Name
Type
Nullable
Subject
string
false
StartDate
datetime
true
EndDate
datetime
true
Location
string
true
List of proposed parameters:
Provider (using the ValidateSetAttribute for selecting Microsoft or Google)
Notes
It's foreseeable that a Cmdlet with support for multiple Calendar providers would need to be split up into several functions. To keep the underlying functions private, declare these helper methods within the body of the Get-Calendar Cmdlet. One downside of this technique would be that it blows up the Cmdlet body considerably, but on the bright side it emphasizes that all these functions belong together.
For Outlook there are at least two viable options for retrieving the Calendar data (COM Object or Microsoft Graph REST API). The first solution would limit Outlook users to Windows computers that already have Office365 installed, and from what I have gathered it's generally discouraged to use COM objects in this day and age. As far as Gmail is concerned, this blog post details the steps required to authenticate an application for accessing the Gmail API using OAuth v2.
Clarify how API secrets are going to be stored persistently across all platforms following current best practices?
Proposal
The
Get-Calendar
Cmdlet currently pretty-prints a specific month or year to the terminal, but something more useful than that would probably integrate data from Outlook or Gmail in some capacity. That way this new feature could emit an array of PowerShell object with the following properties:Subject
string
false
StartDate
datetime
true
EndDate
datetime
true
Location
string
true
List of proposed parameters:
Provider
(using theValidateSetAttribute
for selectingMicrosoft
orGoogle
)Notes
Get-Calendar
Cmdlet. One downside of this technique would be that it blows up the Cmdlet body considerably, but on the bright side it emphasizes that all these functions belong together.