![]() ![]() MailMessage #Change port number for SSL to 587 $smtp = New-Object Net. Powershell #Connection Details #Uncomment Next 2 lines if email username/password are needed #$username=”username” #$password=”password” $smtpServer = “ MYMAILSERVER. This first script searches a specific folder for documents with specific words in the titles and emails the names of those files out, but it doesn't attach the actual files: Here is what I currently have, both work as described when run separately: I was thinking of just kicking this off every so often with Task Scheduler. (Ideally, it would only email the newest file with those specific words, but all of them with those specific words would work if need be). I need to monitor a folder on a network drive and if a file gets added to that folder with specific words in the title name, I need it to attach that file and email it to me. Maybe an entirely new script would be better, not sure? I've seen some pay programs that look promising, but it seems like this should be fairly easy to do in Powershell (provided you aren't me, apparently). I'm having trouble combining them to do exactly what I want, No matter what I do I keep getting some type of errors. I've looked through a lot of posts, some here, and have found 2 scripts that each do a part of what I need done. ![]() If you want to see all this information about a single file in a window rather than having to scroll to the side, you can right-click on any entry and then press “Properties.Hello! New to Powershell and could use some help. Modified Time (This is different from #8 and 9 since it tells you when the files attributes, name, and other details were modified rather than when it was accessed. ![]() This is useful if you are working on a Word Document, for example, and want to see how long the file was in use.)
0 Comments
Leave a Reply. |