Windows PowerShell Home
Out-file cannot access logfile references in Attachments of failed Send-MailMessage call
Anders Præstegaard (JMA)
4/23/2013 12:22:49 PM
User(s) can reproduce this bug
Out-file cannot access logfile references in Attachments of failed Send-MailMessage call.
Copying the content of the logfile, putting it in a temporary file and reference that in Attachments is ofcourse an option.
How often does this happen?
Have you seen this problem before in this product?
I do not know if this issue existed previously
Try-Catching Send-MailMessage errors, by specifying non-accessable SMTP-server. A logfile is an argument to the Attachment parameter, that you cannot Out-File to after the Send-MailMessage fails.
Out-File : The process cannot access the file <filepath> because it is being used by another process
to post a comment.
Please enter a comment.
to post a workaround.
Please enter a workaround.
© 2014 Microsoft