Hi, I have created a script which generates the domain controller inventory in csv format on daily basis and name it same as the current date. For example, if we are running it today, the name would be “DC_29032018.csv”. I am using powershell cmdlets for ARS server (QADUser). At the end of the month we have 28, 30 or 31 files according to the month.
Now I want to move all the csv files generated to a folder called “Archive” at the same path once the month ends. I am able to do it on daily basis but not able to automate it on the basis of month end as some month has 30 days and some has 31. Can someone guide where I am doing mistake?