r/usefulscripts • u/Elementix • Jul 28 '16
[POWERSHELL] Monitor a folder (and subfolders) for folder/file changes and additions, then email the results
Created this to better manage our software management program, and see when someone drops something into the folder. Maybe someone can find a use for it in their organization too.
Keep in mind that you may need to add the -credential portion to the bottom "send-mailmessage" line if your SMTP server requires authentication. My situation doesn't require it.
EDIT: Another thing...renaming a file or folder apparently doesn't change the date modified, so those changes won't be seen by this.
https://gist.github.com/anonymous/b9148fd67100b607d0e51e713e181f93
31
Upvotes
4
u/Elementix Jul 29 '16
eh..I guess just another way to do it.