Hello I was hoping to just implement something small to clean up IIS log files without compressing, archiving etc. can I use forfiles with DSC to create a Taskschd.msc?
forfiles /p “C:\inetpub\logs\LogFiles” /s /m . /c “cmd /c Del @path” /d -30
thank you
Check out the xScheduledTask DSC resource in the xComputerManagement DSC module.
https://github.com/PowerShell/xComputerManagement/blob/dev/Examples/Sample_xScheduledTask.ps1