I need to be able to create an appointment / meeting in Outlook for the 5th Friday of any given month; but Outlook doesn't offer a way to do this since there are only 3 to 4 months a year which have a 5th of any given day of the week.
Its not a problem to manually create the meeting requests, but short of flipping through a calendar every year, is there a programmatic way to at least find the dates that this applies? Preferably, having a solution in PowerShell would help, since PowerShell is on just about every Windows computer.
Yes, the following function will find all occurrences when their are 5 weeks with a particular day of the week in a given month.
To run this:
getAllFifthWeekDay 'Friday' '2022'You should see output like the following:
----------------------- EDIT LATER THAT DAY -----------------------
I actually created a fully working example that will not only find the 5th of a given day in a month, but will actually create a meeting invite for that day so its fully an automated process. Hopefully this helps someone else out.
You execute the code with something like the following:
Here is the full code which makes that possible: