I"m trying to put my powershell script in windows task scheduler so I can schedule it to open up an excel file on a monthly basis, without needing my input. The problem that I'm running in to is that the file name changes every month with an updated date. So how do I have a powershell script to open up the correct file?

My current script is as follows:

`$objectExcel = new-object -c excel.application
 $objectExcel.displayAlerts=$false
 $objectExcel.visible=$FALSE
 $main=$objectExcel.workbooks.open("P:\report.xlsm")`

This opens an xlsm file called Report.

In March, when I update the report, I will rename it Report201702. When I update the report in April, I will rename it Report201703.

How do I write my powershell script so it automatically also append the dateformat in the file name, or a way for me to always get the most recent file.