First of all the background of my question:
Sometimes a used application of us is running into a loop in logging, which causes really big sized log-files (rising by 30 MBs per second). As we don't have the access to the full source of the application we cannot fix the issue ourself. We manually have to turn of the application service for removing the log file and start the application afterwards again.
What would really help us:
As we don't want to check the log-file size every few hours ourself, we thought about an automated mechanism doing this job for us. That's why I come up to my question:
Is there a possibility to create an executed file (executed by task scheduler every hour or scanning the file/folder 24/7) the size of a folder or a file and sending any kind of notification (e. g. E-Mail / anything else) when the folder/file exceeds a certain size (e. g. 200 MBs).
I am totally a beginner to PowerShell and Batch-Files, that's why I am really grateful for any kind of consulting and if possible a fully provided and described solution.