Hi Guys,
I am trying to get an HTML file attached and e-mailed to myself.
I run a weekly script that gets and e-mails the Replication status and FSMO Roles of the Domain Controllers on the network.
The Replication Status HTML file gets attached and sent without any issues, it’s the FSMO Roles HTML file that does not get attached.
I get the following error message:
Send-MailMessage : Cannot find drive. A drive with the name 'The syntax of this command is
At D:\Software\ReplicationScripts\HTMLScript.ps1:72 char:17
- Send-MailMessage <<<< -to $toaddress -Bcc $bccaddress -From $fromaddress -Attachments "
host -Subject $subject -BodyAsHtml $msgbody- CategoryInfo : ObjectNotFound: (The syntax of this command is:String) [Send
Exception - FullyQualifiedErrorId : DriveNotFound,Microsoft.PowerShell.Commands.SendMailMessage
- CategoryInfo : ObjectNotFound: (The syntax of this command is:String) [Send
I have attached the script that I am trying to run.
Could you please point me in the right direction.
Regards.