<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Techniatures</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/techniatures/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/techniatures/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 17 Apr 2019 03:36:02 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>E-mail notifications and Exchange Hub Transport</title>
      <link>https://docs.microsoft.com/archive/blogs/techniatures/e-mail-notifications-and-exchange-hub-transport</link>
      <pubDate>Wed, 15 Aug 2012 08:55:00 GMT</pubDate>
      <dc:creator><![CDATA[Konstantin Roskovshenko]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/techniatures/2012/08/15/e-mail-notifications-and-exchange-hub-transport/</guid>
      <description><![CDATA[Most of organizations have a number of smtp notification sources, which exist in background of...]]></description>
      <content:encoded><![CDATA[<div style="padding-left: 30px;"><span style="font-size: small;"><span lang="EN-US"><span face="Calibri" style="font-family: Calibri;">Most of organizations have a number of smtp notification sources, which exist in background of common operations. They can compound a problem if something goes wrong with these notifications. Usually only a few of smtp sources are capable for TLS and authentication, while others are not perfectly configured. As a result, smtp server confines <br />itself with straightforward ip filter where IPs of anonymous &ldquo;technology sources&rdquo; are enlisted.<br />On the other hand, some of administrators may encounter ip address forging in their networks. Thus they want to prevent sending from forged email address but preserve anonymous emails from notification sources. <br />This is possible with help of Exchange transport server. The general approach is to prevent anonymous sending from sensitive accounts. This can be achieved through <br />standard sender filter, which is a part of antispam filter set.&nbsp;<br />The other side of the problem, anonymous sending to sensitive/all addresses, is a part of common antispam strategy and is not addressed here.<br /><br />First, lets install sender filter agent on Hub Transport server. (You may use Edge server instead, avoiding most of the following recommendations.)</span></span></span></div>
<pre><span style="font-family: arial, helvetica, sans-serif; font-size: small;"></span></pre>
<div style="padding-left: 30px;"><span style="font-size: small;"><span lang="EN-US"><span face="Calibri" style="font-family: Calibri;">1.</span> </span><span lang="EN-US"><span face="Calibri" style="font-family: Calibri;">Install sender filter agent:<br /><b>install-transportagent &ndash;name:&rdquo;Sender Filter Agent&rdquo; &ndash;transportagentfactory:&rdquo;&lt;factory&gt;&rdquo; &ndash;assemblypath:&rdquo;&lt;dll path&gt;&rdquo;</b> </span></span></span></div>
<div style="padding-left: 30px;"><span lang="EN-US" style="font-size: small;"><span face="Calibri" style="font-family: Calibri;">(Let me know please if you need an example, as I don&rsquo;t remember the source and found nothing appropriate via fast search which was not thorough.) </span></span></div>
<div style="padding-left: 30px;"><span lang="EN-US" style="font-size: small;"><span face="Calibri" style="font-family: Calibri;">OR</span></span></div>
<div style="padding-left: 30px;"><span face="Calibri" style="font-family: Calibri; font-size: small;"><span lang="EN-US">Just launch </span><b><span lang="RU">install-antispamagents.ps1</span></b><b><span lang="RU"> </span></b><span lang="EN-US">as described in<b> </b><a href="https://technet.microsoft.com/en-us/library/bb201691.aspx"><span color="#0000ff" style="color: #0000ff;">https://technet.microsoft.com/en-us/library/bb201691.aspx</span></a></span></span></div>
<div style="padding-left: 30px;"><span style="font-size: small;"><span lang="EN-US"><span face="Calibri" style="font-family: Calibri;">2.</span>&nbsp;</span><span lang="EN-US"><span face="Calibri" style="font-family: Calibri;">Make sure&nbsp;that sender filter is enabled, see </span><a href="https://technet.microsoft.com/en-us/library/bb124087.aspx"><span color="#0000ff" face="Calibri" style="color: #0000ff; font-family: Calibri;">https://technet.microsoft.com/en-us/library/bb124087.aspx</span></a><span face="Calibri" style="font-family: Calibri;"> </span></span></span></div>
<div style="padding-left: 30px;"><span face="Calibri" style="font-family: Calibri; font-size: small;"><span lang="EN-US">Make&nbsp;sure that the next flags are set for the sender filter:</span><span lang="RU"></span></span></div>
<div style="padding-left: 30px;"><span face="Calibri" style="font-family: Calibri; font-size: small;"><b><span lang="RU">Externalmailenabled=true</span></b><span lang="RU"> (</span><span lang="EN-US">anonymous connections are filtered</span><span lang="RU">); </span></span></div>
<div style="padding-left: 30px;"><span face="Calibri" style="font-family: Calibri; font-size: small;"><b><span lang="RU">Internalmailenabled=false</span></b><span lang="RU"> (</span><span lang="EN-US">authenticated connections are NOT filtered</span><span lang="RU">).</span><span lang="EN-US"></span></span></div>
<div style="padding-left: 30px;"><span lang="EN-US" style="font-size: small;"><span face="Calibri" style="font-family: Calibri;">See pls. </span><a href="https://technet.microsoft.com/en-us/library/aa996920.aspx"><span color="#0000ff" face="Calibri" style="color: #0000ff; font-family: Calibri;">https://technet.microsoft.com/en-us/library/aa996920.aspx</span></a><span face="Calibri" style="font-family: Calibri;"> </span></span></div>
<div style="padding-left: 30px;"><span style="font-size: small;"><span lang="RU"><span face="Calibri" style="font-family: Calibri;">3.</span> </span><span face="Calibri" style="font-family: Calibri;"><span lang="EN-US">Create receive connector for technology sources</span><span lang="RU"> &lt;<b>Technology</b></span><b><span lang="EN-US">Sources</span></b><span lang="RU">&gt;, </span><span lang="EN-US">make IP filter allowing IPs of technology sources</span><span lang="EN-US"> </span><span lang="EN-US">as usually. It is better to appoint connector type as </span><i><span lang="RU">Custom</span></i><i><span lang="RU"> </span></i><span lang="EN-US">and<i> </i>to<i> </i>allow anonymous connections explicitly on this connector</span><span lang="RU">. </span></span></span></div>
<div style="padding-left: 30px;"><span style="font-size: small;"><span lang="EN-US"><span face="Calibri" style="font-family: Calibri;">Take away relay permission from anonymous connection</span></span><span face="Calibri" style="font-family: Calibri;"><span lang="RU">: <br /></span><b><span lang="EN-US">get</span></b><b><span lang="RU">-</span></b><b><span lang="EN-US">receiveconnector</span></b><b><span lang="RU"> &lt;</span></b><b><span lang="EN-US">TechnologyAccounts</span></b><b><span lang="RU">&gt; | </span></b><b><span lang="EN-US">remove</span></b><b><span lang="RU">-</span></b><b><span lang="EN-US">adpermission</span></b><b><span lang="RU"> -</span></b><b><span lang="EN-US">user</span></b><b><span lang="RU"> "</span></b><b><span lang="EN-US">NT</span></b><b><span lang="EN-US"> </span></b><b><span lang="EN-US">AUTHORITY</span></b><b><span lang="RU">\</span></b><b><span lang="EN-US">ANONYMOUS</span></b><b><span lang="EN-US"> </span></b><b><span lang="EN-US">LOGON</span></b><b><span lang="RU">" -</span></b><b><span lang="EN-US">extendedrights</span></b><b><span lang="EN-US"> </span></b><b><span lang="EN-US">ms</span></b><b><span lang="RU">-</span></b><b><span lang="EN-US">exch</span></b><b><span lang="RU">-</span></b><b><span lang="EN-US">smtp</span></b><b><span lang="RU">-</span></b><b><span lang="EN-US">accept</span></b><b><span lang="RU">-</span></b><b><span lang="EN-US">any</span></b><b><span lang="RU">-</span></b><b><span lang="EN-US">recipient</span></b><span lang="RU"> </span></span></span></div>
<div style="padding-left: 30px;"><span lang="EN-US" style="font-size: small;"><span face="Calibri" style="font-family: Calibri;">Take away sending as Exchange Authoritative domain (or Partner domain) permission: <br /><b>get-receiveconnector &lt;TechnologyAccounts&gt; | remove-adpermission -user "NT AUTHORITY\ANONYMOUS LOGON" -extendedrights ms-Exch-SMTP-Accept-Authoritative-Domain-Sender</b></span></span></div>
<div style="padding-left: 30px;"><span face="Calibri" style="font-family: Calibri; font-size: small;"><span lang="EN-US">Note, please, that sending is impossible if alert source appoints sender address belonging to </span><span lang="RU">"</span><b><span lang="EN-US">Authoritative</span></b><b><span lang="EN-US"> </span></b><b><span lang="EN-US">Domain</span></b><span lang="RU">" </span><span lang="EN-US">or </span><span lang="RU">"</span><b><span lang="EN-US">Internal</span></b><b><span lang="EN-US"> </span></b><b><span lang="EN-US">Relay</span></b><b><span lang="EN-US"> </span></b><b><span lang="EN-US">Domain</span></b><span lang="RU">"</span><span lang="EN-US">.</span><span lang="EN-US"> </span><span lang="RU"></span></span></div>
<div style="padding-left: 30px;"><span face="Calibri" style="font-family: Calibri; font-size: small;"><span lang="EN-US">Make sure that the permission</span><span lang="EN-US"> </span><b><span lang="RU">Ms-Exch-Smtp-Accept-Any-Sender</span></b><span lang="RU"> </span><span lang="EN-US">and permission </span><b><span lang="RU">ms-Exch-SMTP-Submit</span></b><span lang="RU"> </span><span lang="EN-US">are still present for anonymous account.</span></span></div>
<div style="padding-left: 30px;"><span lang="EN-US" style="font-size: small;"><span face="Calibri" style="font-family: Calibri;">See pls. </span><a href="https://technet.microsoft.com/en-us/library/aa996395.aspx"><span color="#0000ff" face="Calibri" style="color: #0000ff; font-family: Calibri;">https://technet.microsoft.com/en-us/library/aa996395.aspx</span></a><span face="Calibri" style="font-family: Calibri;"> for more details.</span></span></div>
<div style="padding-left: 30px;"><span style="font-size: small;"><span lang="RU"><span face="Calibri" style="font-family: Calibri;">4.</span> </span><span lang="EN-US"><span face="Calibri" style="font-family: Calibri;">Add blocked (sensitive) senders to external blocked senders list: </span></span><span lang="RU"><br /><span face="Calibri" style="font-family: Calibri;"><b>set-senderfilterconfig -blanksenderblockingenabled:$true -blockedsenders bigboss@<b>contoso.com</b>,superadmin@contoso.com</b></span></span></span></div>
<div style="padding-left: 30px;"><span lang="EN-US" style="font-size: small;"><span face="Calibri" style="font-family: Calibri;">This parameter can accommodate up to 800 email addresses in Exchange 2010.</span></span></div>
<div style="padding-left: 30px;"><span style="font-size: small;"><span lang="EN-US"><span face="Calibri" style="font-family: Calibri;">5.</span> </span><span lang="EN-US"><span face="Calibri" style="font-family: Calibri;">Create <b>External Relay Domain</b> in Exchange organization and have alert sources send alerts from external addresses. If this recommendation is not achievable for some reason, note, please,&nbsp;that you should not take away sending as Exchange Authoritative domain (or Partner domain) permission. In this case, emails might be sent as insensitive senders under the forged IPs. </span></span></span></div>
<div style="padding-left: 30px;"><span face="Calibri" style="font-family: Calibri; font-size: small;"><span lang="EN-US">Checkup sending via </span><span lang="RU">&lt;<b>Technology</b></span><b><span lang="EN-US">Sources</span></b><span lang="RU">&gt;</span><span lang="EN-US"> connector</span><span lang="RU">: </span><span lang="EN-US"></span></span></div>
<div style="padding-left: 30px;"><span style="font-size: small;"><span lang="RU"><span face="Calibri" style="font-family: Calibri;">-</span> </span><span face="Calibri" style="font-family: Calibri;"><span lang="EN-US">Anonymously sent emails can be mailed to internal Exchange recipients only;</span><span lang="RU"></span></span></span></div>
<div style="padding-left: 30px;"><span style="font-size: small;"><span lang="RU"><span face="Calibri" style="font-family: Calibri;">-</span> </span><span face="Calibri" style="font-family: Calibri;"><span lang="EN-US">Relay to other domains is not allowed;</span><span lang="RU"></span></span></span></div>
<div style="padding-left: 30px;"><span style="font-size: small;"><span lang="RU"><span face="Calibri" style="font-family: Calibri;">-</span> </span><span face="Calibri" style="font-family: Calibri;"><span lang="EN-US">Anonymous sending from sensitive addresses is not allowed; </span><span lang="RU"></span></span></span></div>
<div style="padding-left: 30px;"><span style="font-size: small;"><span lang="RU"><span face="Calibri" style="font-family: Calibri;">-</span> </span><span face="Calibri" style="font-family: Calibri;"><span lang="EN-US">Authenticated user can send as any (allowed to him) sender to any (allowed) recipient.</span><span lang="RU"></span></span></span></div>
<div style="padding-left: 30px;"><span lang="EN-US" style="font-size: small;"><span face="Calibri" style="font-family: Calibri;">Sometimes you can find it useful to place external MTA in before of Exchange Hub Transport to accept emails from some internal sources. For example, it might be a typical coexistence scenario.</span></span></div>
<div style="padding-left: 30px;"><span lang="EN-US" style="font-size: small;"><span face="Calibri" style="font-family: Calibri;">Thus you will use only authenticated connections from only one source on the receive connector.</span></span></div>
<div style="padding-left: 30px;"><span face="Calibri" style="font-family: Calibri; font-size: small;"><span lang="EN-US">Just create sending account </span><span lang="RU">&lt;<b>domain\connectorsvc</b>&gt;</span><span lang="RU"> </span><span lang="EN-US">to enter it&rsquo;s credentials onto the external MTA gateway and allow this account to send as any sender.</span></span></div>
<div style="padding-left: 30px;"><span style="font-size: small;"><span lang="EN-US"><span face="Calibri" style="font-family: Calibri;">6.</span> </span><span face="Calibri" style="font-family: Calibri;"><span lang="EN-US">Create receive connector</span><span lang="RU"> &lt;<b>Partner</b>&gt;, </span><span lang="EN-US">and add external MTA&rsquo;s IP to the corresponding list. It is better to create connector of the </span><i><span lang="RU">Custom</span></i><i><span lang="RU"> </span></i><span lang="EN-US">type</span><span lang="RU">. </span><span lang="EN-US">No permissions should be granted under creation. Allow basic authentication and TLS on the connector.</span></span></span></div>
<div style="padding-left: 30px;"><span style="font-size: small;"><span lang="EN-US"><span face="Calibri" style="font-family: Calibri;">7.</span> </span><span face="Calibri" style="font-family: Calibri;"><span lang="EN-US">Grant the account</span><span lang="RU"> &lt;<b>domain\connectorsvc</b>&gt; </span><span lang="EN-US">permission </span><b><span lang="RU">ms-exch-smtp-accept-any-sender</span></b><span lang="RU"> </span><span lang="EN-US">and permission </span><b><span lang="RU">ms-exch-smtp-submit</span></b><span lang="RU"> </span><span lang="EN-US">on the </span><span lang="RU">&lt;<b>Partner</b>&gt;</span><span lang="RU"> </span><span lang="EN-US">receive connector</span><span lang="RU">.</span><span lang="EN-US"></span></span></span></div>
<div style="padding-left: 30px;"><span face="Calibri" style="font-family: Calibri; font-size: small;"><span lang="EN-US">Checkup sending via external MTA</span><span lang="RU">: </span><span lang="EN-US"></span></span></div>
<div style="padding-left: 30px;"><span style="font-size: small;"><span lang="RU"><span face="Calibri" style="font-family: Calibri;">-</span> </span><span face="Calibri" style="font-family: Calibri;"><span lang="EN-US">You can send a message as any sender (allowed by MTA) except of the sender in Authoritative/Partner domain </span><span lang="RU">(</span><span lang="EN-US">no permission</span><span lang="EN-US"> </span><b><span lang="RU">ms-Exch-SMTP-Accept-Authoritative-Domain-Sender</span></b><span lang="RU">); </span></span></span></div>
<div style="padding-left: 30px;"><span style="font-size: small;"><span lang="RU"><span face="Calibri" style="font-family: Calibri;">-</span> </span><span face="Calibri" style="font-family: Calibri;"><span lang="EN-US">You can send a message to any recipient in Authoritative/Partner domain</span><span lang="RU">;</span></span></span></div>
<div style="padding-left: 30px;"><span style="font-size: small;"><span lang="RU"><span face="Calibri" style="font-family: Calibri;">-</span> </span><span face="Calibri" style="font-family: Calibri;"><span lang="EN-US">You can not send a message to the recipient in Internet </span><span lang="RU">(</span><span lang="EN-US">no permission</span><span lang="EN-US"> </span><b><span lang="RU">ms-exch-smtp-accept-any-recipient</span></b><span lang="RU">).</span></span></span></div>
<div style="padding-left: 30px;"><span lang="EN-US"><span style="font-size: small;"><span face="Calibri" style="font-family: Calibri;">Note please that the authentication is much simpler since external MTA supports mutual TLS authentication, as described in </span><a href="https://technet.microsoft.com/en-us/library/bb123543.aspx"><span color="#0000ff" face="Calibri" style="color: #0000ff; font-family: Calibri;">https://technet.microsoft.com/en-us/library/bb123543.aspx</span></a></span><span face="Calibri" style="font-family: Calibri;"></span></span></div>
<pre>&nbsp;</pre>]]></content:encoded>
    </item>
    <item>
      <title>Sending E-mail via Powershell script</title>
      <link>https://docs.microsoft.com/archive/blogs/techniatures/sending-e-mail-via-powershell-script</link>
      <pubDate>Mon, 13 Aug 2012 06:07:17 GMT</pubDate>
      <dc:creator><![CDATA[Konstantin Roskovshenko]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/techniatures/2012/08/13/sending-e-mail-via-powershell-script/</guid>
      <description><![CDATA[This task can be basically performed in two ways.
First one is fairly straightforward as well as...]]></description>
      <content:encoded><![CDATA[<div><span face="Calibri" style="font-family: Calibri;">This task can be basically performed in two ways.</span></div>
<div><span face="Calibri" style="font-family: Calibri;"></span><span style="font-family: Calibri;">First one is fairly straightforward as well as documented. The object is </span><span style="font-family: Calibri;">Net.Mail.SmtpClient, </span><span style="font-family: Calibri;">see </span><a href="https://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient.aspx" style="font-family: Calibri;">https://msdn.microsoft.com/en-us/library/system.net.mail.smtpclient.aspx</a></div>
<div><span face="Calibri" style="font-family: Calibri;">Relevant script code is similar to the next:</span></div>
<p class="ms-rteFontFace-5">$mod1=New-Object Net.Mail.SmtpClient</p>
<div>$mod1.Host = &ldquo;SMTP Gateway FQDN&rdquo;</div>
<div>$mod1.Send(&ldquo;sender@address&rdquo;, &ldquo;recipient@address&rdquo;, &ldquo;Subject line&rdquo;, &ldquo;Plain text body&rdquo;)</div>
<div></div>
<div><span face="Calibri" style="font-family: Calibri;">Thus your script will anonymously send plain text email to the appointed SMTP gateway. Of course, if anonymous connections are allowed there. </span></div>
<div><span face="Calibri" style="font-family: Calibri;">Second method seems to be poorly documented for use with Powershell. This is an old good CDO.Message, see <a href="https://msdn.microsoft.com/en-us/library/ms872547(v=EXCHG.65).aspx">https://msdn.microsoft.com/en-us/library/ms872547(v=EXCHG.65).aspx</a></span></div>
<div><span face="Calibri" style="font-family: Calibri;"><a href="https://msdn.microsoft.com/en-us/library/ms872547(v=EXCHG.65).aspx"></a></span></div>
<div><a href="https://msdn.microsoft.com/en-us/library/ms875947(EXCHG.65).aspx"><span face="Calibri" style="font-family: Calibri;"></span></a></div>
<div><a href="https://msdn.microsoft.com/en-us/library/ms875947(EXCHG.65).aspx"><span face="Calibri" style="font-family: Calibri;"></span></a></div>
<div><span face="Calibri" style="font-family: Calibri;"></span></div>
<div><span face="Calibri" style="font-family: Calibri;"><span face="Calibri" style="font-family: Calibri;">Lot of examples concerns &ldquo;elder&rdquo; scripting languages such as VBScript and C#, see</span><br /><a href="https://msdn.microsoft.com/en-us/library/ms875947(EXCHG.65).aspx">https://msdn.microsoft.com/en-us/library/ms875947(EXCHG.65).aspx</a></span><span style="text-decoration: underline;"><span face="Calibri" style="font-family: Calibri;">, </span></span><a href="https://msdn.microsoft.com/en-us/library/ms527272(EXCHG.10).aspx"><span face="Calibri" style="font-family: Calibri;">https://msdn.microsoft.com/en-us/library/ms527272(EXCHG.10).aspx</span></a><span style="text-decoration: underline;"><span face="Calibri" style="font-family: Calibri;"> <br /></span></span><span face="Calibri" style="font-family: Calibri;">and others.</span></div>
<div><span face="Calibri" style="font-family: Calibri;">Portion of code relevant to the topic looks cumbersome:</span></div>
<div>$mod2=New-Object &ndash;comobject &ldquo;CDO.Message&rdquo;</div>
<div>$mod2.From=&rdquo;sender@address&rdquo;</div>
<div>$mod2.To=&rdquo;recipient@address&rdquo;</div>
<div>$mod2.Subject=&rdquo;Caution&rdquo;</div>
<div>$mod2.Htmlbody=&rdquo;&lt;b&gt; Your mailbox may be temporarily unavailable &lt;/b&gt;&rdquo;</div>
<div>$namespace=&rdquo;https://schemas.microsoft.com/cdo/configuration/&rdquo;</div>
<div>$mod2.Configuration.fields.item($namespace+"sendusing")=2 # stands for sending via smtp port</div>
<div>$mod2.Configuration.fields.item($namespace+"smtpserver&rdquo;)= &ldquo;SMTP Gateway FQDN&rdquo;</div>
<div>$mod2.Configuration.fields.item($namespace+"smtpserverport&rdquo;)=25</div>
<div>$mod2.Configuration.fields.item($namespace+"smtpauthenticate&rdquo;)=1 # stands for sending via anonymous connection</div>
<div>$mod2.Configuration.fields.update()</div>
<div>$mod2.Send()</div>
<div></div>
<div><span face="Calibri" style="font-family: Calibri;">The difference matters when you need to pass authentication or add attachment or add recipients. </span></div>
<div><span face="Calibri" style="font-family: Calibri;">For the first method, you should arrange couple of additional objects, and you may find this somewhat tiring if you are not fond of scripting. When adding additional attrubutes, you will probably have:<br />&nbsp;</span></div>
<div><span face="Calibri" style="font-family: Calibri;">$mod1=new-object Net.Mail.SmtpClient(&ldquo;SMTP Gateway FQDN&rdquo;)<br /></span><span face="Calibri" style="font-family: Calibri;">$email = New-Object System.Net.Mail.Mailmessage<br />$email.Subject = &ldquo;Caution&rdquo;<br />$email.Body = &rdquo;&lt;b&gt; Your mailbox may be temporarily unavailable &lt;/b&gt;&rdquo;<br />$email.IsBodyHTML = $true<br />$email.from = "</span><a title="mailto:sender@company.com" href="mailto:sender@company.com"><span face="Calibri" style="font-family: Calibri;">sender@address</span></a><span face="Calibri" style="font-family: Calibri;"> ") <br />$email.To.Add("</span><a title="mailto:recipient@company.com" href="mailto:recipient@company.com"><span face="Calibri" style="font-family: Calibri;">recipient1@address</span></a><span face="Calibri" style="font-family: Calibri;">")<br />$email.To.Add("</span><a title="mailto:recipient@company.com" href="mailto:recipient@company.com"><span face="Calibri" style="font-family: Calibri;">recipient2@address</span></a><span face="Calibri" style="font-family: Calibri;">")<br />$email.Attachments.Add(&ldquo;c:\Usersguide.doc&rdquo;)<br />$mod.Send($email)</span></div>
<div><span face="Calibri" style="font-family: Calibri;">When adding credentials you should use:</span></div>
<div><span face="Calibri" style="font-family: Calibri;">&hellip;<br /></span><span face="Calibri" style="font-family: Calibri;">$cred = New-Object System.Net.NetworkCredential<br />$cred.Domain=&rdquo;Gateway1&rdquo; # make sense if Gateway1 is Windows server trusting some other Windows domains<br />$cred.Username=&rdquo;smtpuser&rdquo;<br />$cred.Username=&rdquo;P@ssw0rd&rdquo;<br />$mod1.Credentials=$cred<br />$mod1.Send($email)</span></div>
<div><span face="Calibri" style="font-family: Calibri;">On the other hand, with the second method, you gain all of the above within one interface. Just need to add </span></div>
<div>&hellip;<br />$mod2.addatachment(&ldquo;c:\Usersguide.doc&rdquo;)</div>
<div>$mod2.configuration.fields($namespace+"sendusername&rdquo;)=&rdquo;Gateway1\smtpuser&rdquo;</div>
<div>$mod2.configuration.fields($namespace+"sendpassword&rdquo;)=&rdquo;P@ssw0rd&rdquo;</div>
<div></div>
<div><span face="Calibri" style="font-family: Calibri;">I prefer the second method as it allows to use basically the same sending script for different tasks or to rework it with less efforts. In addition, CDO object allows use your Exchange server as a Gateway1 mentioned above, establishing MAPI connection to Exchange. The parameter:</span></div>
<div>$mod2.Configuration.fields.item($namespace+"sendusing")=3</div>
<div>stands for sending the email via MAPI client. Thus you don&rsquo;t need to allow anonymous connection and/or to change receive connectors.</div>
<div><span face="Calibri" style="font-family: Calibri;">Since Exchange 2007 you have to install version 1.2.1 of MAPI CDO library as a separate file, see KB </span><a href="https://support.microsoft.com/kb/171440#top"><span face="Calibri" style="font-family: Calibri;">https://support.microsoft.com/kb/171440#top</span></a><span face="Calibri" style="font-family: Calibri;"> and download </span><a href="https://www.microsoft.com/download/en/details.aspx?DisplayLang=en&amp;id=1004"><span face="Calibri" style="font-family: Calibri;">https://www.microsoft.com/download/en/details.aspx?DisplayLang=en&amp;id=1004</span></a><span face="Calibri" style="font-family: Calibri;"> . Or you can launch your scripts on admin station where Outlook is installed.</span></div>]]></content:encoded>
    </item>
    <item>
      <title>CA cluster and NDES</title>
      <link>https://docs.microsoft.com/archive/blogs/techniatures/ca-cluster-and-ndes</link>
      <pubDate>Wed, 06 Jul 2011 17:32:00 GMT</pubDate>
      <dc:creator><![CDATA[Konstantin Roskovshenko]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/techniatures/2011/07/06/ca-cluster-and-ndes/</guid>
      <description><![CDATA[This is a brief of PKI solution intended to issue certificates for network devices. The initial...]]></description>
      <content:encoded><![CDATA[<p><span style="font-family: Calibri;" face="Calibri">This is a brief of PKI solution intended to issue certificates for network devices. The initial requirement was to make issuing layer fully centralized and highly available. Thus it has fallen in some contradiction with normal placement of NDES feature. (List of standard AD CS features is here </span><a href="https://technet.microsoft.com/en-us/library/cc731564.aspx"><span style="font-family: Calibri; color: #0000ff;" face="Calibri" color="#0000ff">https://technet.microsoft.com/en-us/library/cc731564.aspx</span></a><span style="font-family: Calibri;" face="Calibri">)</span></p>
<div class="ms-rteFontSize-2"><span style="font-family: Calibri;" face="Calibri">The decision was to place NDES feature on the separate box and to target it at the issuing CA cluster. Both components are not complex looked at one by one. Their deployment is documented well (here </span><a href="https://www.microsoft.com/download/en/confirmation.aspx?id=331"><span style="font-family: Calibri; color: #0000ff;" face="Calibri" color="#0000ff">https://www.microsoft.com/download/en/confirmation.aspx?id=331</span></a><span style="font-family: Calibri;" face="Calibri"> for the cluster and here </span><a href="https://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;id=1607"><span style="font-family: Calibri; color: #0000ff;" face="Calibri" color="#0000ff">https://www.microsoft.com/download/en/details.aspx?displaylang=en&amp;id=1607</span></a><span style="font-family: Calibri;" face="Calibri"> for NDES); most of possible consequences are described in knowledge bases and are known to the community.</span></div>
<div class="ms-rteFontSize-2"><span style="font-family: Calibri;" face="Calibri">All together looks like quite complex solution, and even it has not been yet tested by the developers. Usual supportability practice is that only tested configuration is supported. Nevertheless this time developers ensured us there are no known limitations of targeting SCEP at clustered CA, comparing to the standalone CA server. </span></div>
<div class="ms-rteFontSize-2"><span style="font-family: Calibri;" face="Calibri">So, the solution was adopted by the customer (we met all the requirements) and by the support service (we followed all the recommendations). </span></div>
<div class="ms-rteFontSize-2"><span style="font-family: Calibri;" face="Calibri">Unfortunately, Microsoft SCEP facility could not be used as a clustered or balanced solution, mostly due to the &ldquo;enrollment password&rdquo; encryption for initial certificate request. Password encryption relies in Windows onto DPAPI (</span><a href="https://msdn.microsoft.com/en-us/library/ms995355.aspx"><span style="font-family: Calibri; color: #0000ff;" face="Calibri" color="#0000ff">https://msdn.microsoft.com/en-us/library/ms995355.aspx</span></a><span style="font-family: Calibri;" face="Calibri">) and uses user profile data and system-dependent data. It appeared impossible (and unsupported, of course) to synchronize the password across machine boundaries. Thus customer was satisfied with two or more independent NDES servers of the same configuration, and transferred resolution of NDES availability issues to the network device operations.</span></div>
<div class="ms-rteFontSize-2"><span style="font-family: Calibri;" face="Calibri">What was wrong for the interaction: SCEP service, which is web application pool in behind, sporadically lost connectivity to the clustered CA. Usually it happened after CA failover, but later on connectivity might become restored &ldquo;by itself&rdquo;, and yet later on lost at once. </span></div>
<p class="ms-rteFontSize-2"><span style="font-family: Calibri;" face="Calibri">Network sniffer brought nothing or almost nothing. We ensured, yes, there is no connectivity to RPC service or DCOM service, but with no idea about the root cause. Fortunately, web application pool settings in IIS 7 (and previous as well) allow to recycle the pool and thus to avoid impact of &ldquo;sporadically lost connectivity&rdquo;. What has been done see here </span><a href="https://technet.microsoft.com/en-us/library/cc733120(WS.10).aspx"><span style="font-family: Calibri; color: #0000ff;" face="Calibri" color="#0000ff">https://technet.microsoft.com/en-us/library/cc733120(WS.10).aspx</span></a><span style="font-family: Calibri;" face="Calibri"> and </span><a href="https://technet.microsoft.com/en-us/library/cc771956(WS.10).aspx"><span style="font-family: Calibri; color: #0000ff;" face="Calibri" color="#0000ff">https://technet.microsoft.com/en-us/library/cc771956(WS.10).aspx</span></a><span style="font-family: Calibri;" face="Calibri"> . </span></p>
<p class="ms-rteFontSize-2"><span style="font-family: 'calibri', 'sans-serif';" class="ms-rteFontSize-2">I didn&rsquo;t find any KB article describing the approach explained here. But this is hopefully seldom &ndash; i.e. complex &ndash; situation.</span></p>]]></content:encoded>
    </item>
  </channel>
</rss>