kllarson
asked on
PS script to scan folder and email results
I'm not a Powershell guru, so I could use a little assistance.
I'm looking for a PS Script that I can set up in Task Scheduler that will run every 10 minutes. I want it to scan an FTP folder and email me the results of any changes. I have tried one that I found on another site, but even thought it appears to run clean, it never submits the email to my local mail server.
Any help would be greatly appreciated.
Thanks,
Ken
I'm looking for a PS Script that I can set up in Task Scheduler that will run every 10 minutes. I want it to scan an FTP folder and email me the results of any changes. I have tried one that I found on another site, but even thought it appears to run clean, it never submits the email to my local mail server.
Any help would be greatly appreciated.
Thanks,
Ken
If the other one works but just doesn't send the email, go ahead and post it. It'll save some effort.
ASKER
Here is the script I found on a Spiceworks thread minus my personal changes to server and email. I have attached it as a .txt file.
This is the setup in Task Scheduler.
Start a program:
powershell -ExecutionPolicy ByPass -file "c:\scripts\ScanFolderForC hangedFile s.ps1"
This is the setup in Task Scheduler.
Start a program:
powershell -ExecutionPolicy ByPass -file "c:\scripts\ScanFolderForC
Did you mean to attach something to the prior post?
~bp
~bp
ASKER
Forgot the extra click on "Upload File"
Scan-Folder-for-Changed_Added-Files.txt
Scan-Folder-for-Changed_Added-Files.txt
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the Send-MailMessage tip. I was able to try that and get a test message through. Doing some more testing, but appears to be working now.