Author Posts

January 1, 2012 at 12:00 am

by tomstrader at 2012-10-15 12:05:44

Greetings Everyone:
First off, thanks for this great resource.

I have been task to create a script that will run from a scheduled task that looks into a directory for files that are 15 minutes old and older from the current time and date and send an email to a distribution list if any are found.

I have the email part down, just having a time getting the parameter for the files and then determining if they are older than 15 minutes then trigger the email to the DL.

Thanks in advance.
'Tom'

by JeffH at 2012-10-15 19:50:21

This will show you the files that have been modified in the last 15 minutes

dir c:\work | where {$_.lastwritetime -ge (Get-Date).AddMinutes(-15)}

by tomstrader at 2012-10-15 20:34:18

Jeffrey,

Thank you so much.

Tom