Find the nth particular Weekday in a Month for a given Year

Hi all,

Here is a small Cmdlet named Get-NDayOfMonth that’s an extented version of the Get-PatchTuesdayDate Cmdlet already published earlier on this blog. Basically this new Cmdlet Get-NDayOfMonth is a generic form of the Get-PatchTuesdayDate that return a System.DateTime object corresponding to the nth particular Weekday in a Month for a given Year.

Here is the code:

I hope this will be helpful for someone !