February 2014
Intermediate to advanced
374 pages
8h 12m
English
After creating a report, you might want to send it to your boss or to yourself. The PowerShell Send-MailMessage cmdlet can send e-mail messages using an SMTP server. The syntax of this cmdlet is as follows:
Send-MailMessage [-To] <String[]> [-Subject] <String> [[-Body] <String>] [[-SmtpServer] <String>] [-Attachments <String[]>] [-Bcc <String[]>] [-BodyAsHtml] [-Cc <String[]>] [-Credential <PSCredential>] [-DeliveryNotificationOption <DeliveryNotificationOptions>] [-Encoding <Encoding>] [-Port <Int32>] [-Priority <MailPriority>] [-UseSsl] -From <String> [<CommonParameters>]
The –From, -To, and –Subject parameters are required to send a report by e-mail. You can use the PowerShell $PSEmailServer preference variable for ...
Read now
Unlock full access