<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Send-Mailmessage on Matt Thornton</title>
    <link>https://matt-thornton.net/tags/send-mailmessage/</link>
    <description>Recent content in Send-Mailmessage on Matt Thornton</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Tue, 05 Dec 2017 11:06:59 +0000</lastBuildDate><atom:link href="https://matt-thornton.net/tags/send-mailmessage/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Chaining Powershell commands - now with email alerts</title>
      <link>https://matt-thornton.net/tech/powershell-tech/chaining-powershell-commands-now-email-alerts/</link>
      <pubDate>Tue, 05 Dec 2017 11:06:59 +0000</pubDate>
      
      <guid>https://matt-thornton.net/tech/powershell-tech/chaining-powershell-commands-now-email-alerts/</guid>
      
        <description>&lt;p&gt;I recently talked about some &lt;a href=&#34;https://www.matt-thornton.net/tech/powershell-tech/quick-tip-chaining-powershell-commands&#34;&gt;simple functionality to chain Powershell&lt;/a&gt; commands together so that you can time long-running processes.&lt;/p&gt;
&lt;p&gt;I decided to take this concept a little further so that Powershell will send email messages at start and finish so I don&amp;rsquo;t need to keep checking for when a long-running process has actually finished.&lt;/p&gt;
&lt;p&gt;The idea is simple:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;You send a message when it starts&lt;/li&gt;
&lt;li&gt;You run the process&lt;/li&gt;
&lt;li&gt;You send a message when it ends&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Note: this assumes you&amp;rsquo;re in a Windows domain environment with access to an Exchange server. In order to authenticate against Exchange, you obviously need a domain account and be aware, there may be some things about your Exchange environment that does not allow this functionality (e.g., no relaying etc.) If you&amp;rsquo;re not in an Exchange environment, you&amp;rsquo;ll need to set the SMTP server of whatever you&amp;rsquo;re using.&lt;/p&gt;</description>
      
    </item>
    
  </channel>
</rss>