I'm having a problem where the below command works but not the way it should. For example, if i have two files it will display both files in the email instead of just one.
$fname=Get-ChildItem \\Main\Drop| Where-Object {!$_.PSIsContainer} and here is the body of the email
$Body = "Check Drop Folder for new file: `n $fname `n`nOR `nclick here: \\Main\Drop\$fname"
If i have 2 files in that drop directory say: file1.txt, file2.txt the email will say:
Check Drop Folder for new file:
file1.txt file2.txt
OR
click here: \\main\Drop\file1.txt file2.txt
I know its a simple fix but im missing it..