<?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>Mitchel Lewis</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/mitchelatmicrosoft/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/mitchelatmicrosoft/feed.xml</link>
    <description>Tips and Tricks for Exchange Online</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:28:55 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Exchange Online: Validate-OutboundConnector: Meet the coolest Cmdlet that I never knew about, until now.</title>
      <link>https://docs.microsoft.com/archive/blogs/mitchelatmicrosoft/exchange-online-validate-outboundconnector-meet-the-coolest-cmdlet-that-i-never-knew-about-until-now</link>
      <pubDate>Mon, 08 Jun 2015 03:01:00 GMT</pubDate>
      <dc:creator><![CDATA[Mitchel Lewis]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mitchelatmicrosoft/2015/06/08/exchange-online-validate-outboundconnector-meet-the-coolest-cmdlet-that-i-never-knew-about-until-now/</guid>
      <description><![CDATA[Background:
I actually stumbled across a neat cmdlet that I have never noticed before,...]]></description>
      <content:encoded><![CDATA[<p><strong>Background:</strong></p>
<p>I actually stumbled across a neat cmdlet that I have never noticed before, <strong>Validate-OutboundConnector</strong>. It basically allows you to observe and validate the route that your messages take through your connectors in the cloud.&nbsp;</p>
<p><strong>The Who and the What:</strong></p>
<p>Simply connect to remote powershell and run <strong>Validate-OutboundConnector -Identity &quot;Connector Name&quot; -Recipients &quot;you@yourdomain.com&quot;</strong> and you&#39;ll get a cool play by play of the hops your email takes to it&#39;s destination. You can also throw in the &#39;-Verbose&#39; switch</p>
<p>Below is an example that I ran, you can also run it with the &#39;-Verbose&#39; switch if you like.</p>
<p><em>PS C:\Users\Mitchel&gt; <strong>Validate-OutboundConnector -Identity Outbound -Recipients blahblahblah8675309@hotmail.com</strong></em></p>
<p><br /><em>RunspaceId : 381ab9da-18d2-4f80-a44a-eea4f82cde89</em><br /><em>TaskName : Connector Validation</em><br /><em><strong>IsTaskSuccessful : True</strong></em><br /><em></em></p>
<p><em> Timestamp:6/8/2015 8:54:43 AM</em><br /><em> EventId:SEND</em><br /><em> Source:SMTP</em><br /><em> MessageSubject:Test email for connector validation</em><br /><em> MessageId:&lt;964f428e-c75e-490a-b272-1156932922b2@CY1PR0201MB1066.namprd02.prod.outlook.com&gt;</em><br /><em> Recipients:blahblahblah8675309@hotmail.com</em><br /><em> RecipientCount:1</em><br /><strong><em> RecipientStatus:250 blahblahblah8675309@hotmail.com</em></strong><br /><strong><em> SourceContext:;250</em></strong><br /><em> &lt;964f428e-c75e-490a-b272-1156932922b2@CY1PR0201MB1066.namprd02.prod.outlook.com&gt; Queued mail for</em><br /><em> delivery;ClientSubmitTime:</em><br /><em> Sender:O365ConnectorValidation@contoso.onmicrosoft.com</em><br /><em> EventData:E2ELatency:2.813, ExternalSendLatency:1.969, Microsoft.Exchange.Hygiene.TenantOutboundConn</em><br /><em> ectorCustomData:Name=Outbound;ConnectorType=Partner;UseMxRecord=True, ToEntity:Internet,</em><br /><em> FromEntity:Unknown, MsgRecipCount:1, <strong>OutboundProxyTargetIPAddress:65.55.92.168</strong>,</em><br /><em> <strong>OutboundProxyTargetHostName:mx3.hotmail.com</strong>, OutboundProxyFrontendName:BL2FFO11FD031,</em><br /><em> DeliveryPriority:Normal, Oorg:contoso.onmicrosoft.com, OriginalFromAddress:&lt;&gt;,</em><br /><em> AccountForest:NAMPR02A001.prod.outlook.com</em></p>
<p><br /><em> ; SubTasksResults = TaskName = blahblahblah8675309@hotmail.com; IsTaskSuccessful = True; TaskDetail = OK;</em><br /><em> SubTasksResults = |</em><br /><em> |}</em><br /><em>Identity :</em><br /><em>ObjectState : New</em><br /><em>IsValid : True</em></p>
<p>You can confirm success on your end by looking for this value:</p>
<p><strong>IsTaskSuccessful : True</strong></p>
<p>Your recipient will get a nice test message confirming it:</p>
<p><strong><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/80/7713.confirmation.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-80/7713.confirmation.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/80/7713.confirmation.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-80/7713.confirmation.jpg" border="0" alt=" " /></a><br /></strong></p>
<p><strong>&nbsp;</strong></p>
<p>It&#39;s also helpful if another admin from another company is blaming you/us unnecessarily, sending them this output is pretty hard to argue with. You can also script this to easily send in intervals or run against multiple connectors as well various other troubleshooting/monitoring scenarios.</p>
<p>I didn&#39;t see any real mention of it anywhere on the internet, so I decided to write a blog post in the interim. I hope it helps!</p>
<p>Mitchel</p>]]></content:encoded>
    </item>
    <item>
      <title>Exchange Online: Blocking Auto-Forward Messages to External Recipients</title>
      <link>https://docs.microsoft.com/archive/blogs/mitchelatmicrosoft/exchange-online-blocking-auto-forward-messages-to-external-recipients</link>
      <pubDate>Sun, 03 May 2015 18:39:00 GMT</pubDate>
      <dc:creator><![CDATA[Mitchel Lewis]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mitchelatmicrosoft/2015/05/03/exchange-online-blocking-auto-forward-messages-to-external-recipients/</guid>
      <description><![CDATA[Background:
Every now and then, we are presented with the question: &quot;How do we prevent...]]></description>
      <content:encoded><![CDATA[<p><span style="font-size:medium;"><strong>Background:</strong></span></p>
<p><span style="font-size:medium;"><span style="font-size:small;">Every now and then, we are presented with the question: &quot;How do we prevent internal messages from being Auto-Forwarded to external recipients?&quot; which usually follows with us reviewing a transport rule or several other creative methods that fail to stop forwarding externally.</span></span></p>
<p><span style="font-size:small;">The &quot;catch&quot; with Auto-Forwarded messages is that you want to focus more on the destination of the <span style="text-decoration:underline;"><strong>Auto-Forward&nbsp;</strong></span>message rather than the source, in this case, the external recipient we&#39;re trying to prevent from receiving our email. The user with the Auto-Forward configured is not considered the &quot;sender&quot; of the forwarded message in the transport layer. That configuration just instructs Transport on how/where to deliver a copy of the message that is sent to them before it even touches their mailbox. When you try to scope the rule to the original intended recipient or sender, the rule will not function in the manner you are intending because it fails to address the origin or the destination of Auto-Forwarded message and often assumes that the intended recipient is also the source of the message, in error.<br /><br />As a result of this common confusion, below are the methods that I would use for testing and implementing this restriction in my own environment. If enough people want a deeper dive into the supporting technology, let me know in the comments and I can revise this.</span></p>
<p><strong><span><span><span style="font-size:small;">Scoped Method:</span><br /><br /></span></span></strong><span><span>Prior to implementing a global change in production, it&#39;s wise to scope it to test users initially to verify that it works as desired. Below is how to properly scope the rules.</span></span></p>
<p>1. Create New Rule</p>
<p>2. *Apply this rule if...</p>
<ul>
<li>1. The sender is located... &quot;Inside the organization&quot;</li>
<li>2. The recipient is located... Put the external destination&#39;s email address or define their Contact in this field</li>
<li>3. The message type is... &quot;Auto-Forward&quot;</li>
</ul>
<p>3. Choose your desired action (NDR/Forward etc etc), I chose to reject the message with an explanation</p>
<p><span style="font-size:medium;"><span style="font-size:small;"><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/80/example2.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-80/example2.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/80/example2.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-80/example2.jpg" border="0" alt=" " /></a><br /></span></span></p>
<p><strong><span style="font-size:medium;"><span style="font-size:small;">&nbsp;</span></span></strong></p>
<p><strong><span style="font-size:medium;"><span style="font-size:small;">Global Method:<br /><br /></span></span></strong><span style="font-size:medium;"><span style="font-size:small;">Once you&#39;re sure that this rule is acting accordingly to Auto-Forward messages destined externally, you can implement into production by doing the following.</span></span></p>
<p><span style="font-size:medium;"><span style="font-size:small;">1. Create New Rule</span></span></p>
<p><span style="font-size:medium;"><span style="font-size:small;">2. *Apply this rule if...</span></span></p>
<ul>
<li><span style="font-size:medium;"><span style="font-size:small;">1. The sender is located... &quot;Inside the organization&quot;</span></span></li>
<li><span style="font-size:medium;"><span style="font-size:small;">2. The recipient is located... &quot;Outside the organization&quot;</span></span></li>
<li><span style="font-size:medium;"><span style="font-size:small;">3. The message type is... &quot;Auto-Forward&quot;<br /></span></span></li>
</ul>
<p><span style="font-size:medium;"><span style="font-size:small;">3. Choose your desired action (NDR/Forward etc etc), I chose to reject the message with an explanation.</span></span><span style="font-size:medium;"><span style="font-size:small;"><br /></span></span></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/80/Example.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-80/Example.jpg" style="font-size:small;"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/03/80/Example.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-03-80/Example.jpg" border="0" alt=" " /></a></p>
<p><span style="font-size:medium;"><span style="font-size:small;">&nbsp;</span></span></p>
<p><span style="font-size:medium;"><span style="font-size:small;">I hope this helps</span></span></p>
<p><span style="font-size:medium;"><span style="font-size:small;">-Mitchel</span></span></p>
<p></p>]]></content:encoded>
    </item>
    <item>
      <title>Exchange Online: Restricting cmdlets with RBAC</title>
      <link>https://docs.microsoft.com/archive/blogs/mitchelatmicrosoft/exchange-online-restricting-cmdlets-with-rbac</link>
      <pubDate>Tue, 13 Jan 2015 15:40:00 GMT</pubDate>
      <dc:creator><![CDATA[Mitchel Lewis]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mitchelatmicrosoft/2015/01/13/exchange-online-restricting-cmdlets-with-rbac/</guid>
      <description><![CDATA[Background:
We do not get many cases like this in CSS for some reason. I believe this is because...]]></description>
      <content:encoded><![CDATA[<p><strong><span style="font-size:medium;">Background:</span></strong></p>
<p>We do not get many cases like this in CSS for some reason. I believe this is because most enterprises seem to leverage their Tenant Admin for support and provisioning the service. As this service grows, there will be more and more support personnel supporting this service in the enterprise. Occasionally, we will get asked how to restrict specific functionality from users though. One thing you should consider is that anything changed/executed in EAC is ultimately just triggering a cmdlet to be run. All of the pages will be visible, but their ability to read/write values depends on the cmdlets you allow them to run via RBAC.<br /><br /><strong><span style="font-size:medium;">Solution:</span></strong></p>
<p>Since this can potentially impact production support users, I highly recommend copying a Management Role that you intend on trimming up, just so that you&#39;re not changing anything that anyone is using presently. To do that, you just need to specify a parent role to when running New-ManagementRole in remote powershell (this cannot be done via EAC)</p>
<p><strong><span style="font-size:small;">Example:</span></strong></p>
<p>New-ManagementRole &ndash;Name &ldquo;Transport Rules Limited&rdquo; &ndash;Parent &ldquo;Transport Rules&quot;<br />New-ManagementRole &ndash;Name &ldquo;Transport Hygiene Limited&rdquo; &ndash;Parent &ldquo;Transport Hygiene&rdquo;</p>
<p><strong>From there, you can run something like this:</strong></p>
<p>Get-ManagementRoleEntry &quot;Transport Hygiene Limited\*&quot;</p>
<p>OR</p>
<p>Get-ManagementRoleEntry &quot;Transport Rules Limited\*&quot;</p>
<p><strong>Which should output something like this (notice that the parameters aren&#39;t fully enumerated):</strong></p>
<p>Disable-HostedContentFilter... Transport Hygiene Limited {Confirm, ErrorAction, ErrorVariable, Identity...}<br />Disable-MalwareFilterRule&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Transport Hygiene Limited {Confirm, ErrorAction, ErrorVariable, Identity...}<br />Enable-HostedContentFilterRule Transport Hygiene Limited {Confirm, ErrorAction, ErrorVariable, Identity...}<br />Enable-MalwareFilterRule&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Transport Hygiene Limited {Confirm, ErrorAction, ErrorVariable, Identity...}<br />Get-HostedConnectionFilterP... Transport Hygiene Limited {ErrorAction, ErrorVariable, Identity, OutBuffer...}<br />Get-HostedContentFilterPolicy&nbsp; Transport Hygiene Limited {ErrorAction, ErrorVariable, Identity, OutBuffer...}<br />Get-HostedContentFilterRule&nbsp;&nbsp;&nbsp; Transport Hygiene Limited {ErrorAction, ErrorVariable, Identity, OutBuffer...}<br />Get-HostedOutboundSpamFilte... Transport Hygiene Limited {ErrorAction, ErrorVariable, OutBuffer, OutVariable...}<br />Get-MalwareFilterPolicy&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Transport Hygiene Limited {ErrorAction, ErrorVariable, Identity, OutBuffer...}<br />Get-MalwareFilterRule&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Transport Hygiene Limited {ErrorAction, ErrorVariable, Identity, OutBuffer...}<br />New-HostedConnectionFilterP... Transport Hygiene Limited {AdminDisplayName, Confirm, EnableSafeList, ErrorAction...}<br />New-HostedContentFilterPolicy&nbsp; Transport Hygiene Limited {AddXHeaderValue, AdminDisplayName, Confirm, DownloadLink...}<br />New-HostedContentFilterRule&nbsp;&nbsp;&nbsp; Transport Hygiene Limited {Comments, Confirm, Enabled, ErrorAction...}<br />New-MalwareFilterPolicy&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Transport Hygiene Limited {Action, AdminDisplayName, Confirm, CustomAlertText...}<br />New-MalwareFilterRule&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Transport Hygiene Limited {Comments, Confirm, Enabled, ErrorAction...}<br />Release-QuarantineMessage&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Transport Hygiene Limited {Confirm, ErrorAction, ErrorVariable, Identity...}<br />Remove-HostedConnectionFilt... Transport Hygiene Limited {Confirm, ErrorAction, ErrorVariable, Identity...}<br />Remove-HostedContentFilterP... Transport Hygiene Limited {Confirm, ErrorAction, ErrorVariable, Identity...}<br />Remove-HostedContentFilterRule Transport Hygiene Limited {Confirm, ErrorAction, ErrorVariable, Identity...}<br />Remove-MalwareFilterPolicy&nbsp;&nbsp;&nbsp;&nbsp; Transport Hygiene Limited {Confirm, ErrorAction, ErrorVariable, Identity...}<br />Remove-MalwareFilterRule&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Transport Hygiene Limited {Confirm, ErrorAction, ErrorVariable, Identity...}<br />Set-HostedConnectionFilterP... Transport Hygiene Limited {AdminDisplayName, Confirm, EnableSafeList, ErrorAction...}<br />Set-HostedContentFilterPolicy&nbsp; Transport Hygiene Limited {AddXHeaderValue, AdminDisplayName, Confirm, DownloadLink...}<br />Set-HostedContentFilterRule&nbsp;&nbsp;&nbsp; Transport Hygiene Limited {Comments, Confirm, ErrorAction, ErrorVariable...}<br />Set-HostedOutboundSpamFilte... Transport Hygiene Limited {AdminDisplayName, BccSuspiciousOutboundAdditionalRecipient...<br />Set-MalwareFilterPolicy&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Transport Hygiene Limited {Action, AdminDisplayName, Confirm, CustomAlertText...}<br />Set-MalwareFilterRule&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Transport Hygiene Limited {Comments, Confirm, ErrorAction, ErrorVariable...}<br />Get-QuarantineMessage&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Transport Hygiene Limited {Confirm, Direction, Domain, EndExpiresDate...}<br />Get-QuarantineMessageHeader&nbsp;&nbsp;&nbsp; Transport Hygiene Limited {ErrorAction, ErrorVariable, Identity, OutBuffer...}</p>
<p><strong>Run the following and it will force it to enumerate those fields:</strong></p>
<p>$FormatEnumerationLimit =-1</p>
<p><strong>Then you can run and it will display the cmdlets and switches the user belonging to that role can run. If it&#39;s not listed, they can&#39;t run it.</strong></p>
<p>Get-ManagementRoleEntry &quot;Transport Hygiene Limited\*&quot; | fl name,parameters</p>
<p></p>
<p>Name : Set-HostedContentFilterPolicy<br />Parameters : {AddXHeaderValue, AdminDisplayName, BulkThreshold, Confirm, DownloadLink, EnableEndUserSpamNotifications, <br /> EnableLanguageBlockList, EnableRegionBlockList, EndUserSpamNotificationCustomFromAddress, <br /> EndUserSpamNotificationCustomFromName, EndUserSpamNotificationCustomSubject, <br /> EndUserSpamNotificationFrequency, EndUserSpamNotificationLanguage, EndUserSpamNotificationLimit, <br /> ErrorAction, ErrorVariable, HighConfidenceSpamAction, Identity, IncreaseScoreWithBizOrInfoUrls, <br /> IncreaseScoreWithImageLinks, IncreaseScoreWithNumericIps, IncreaseScoreWithRedirectToOtherPort, <br /> LanguageBlockList, MakeDefault, MarkAsSpamBulkMail, MarkAsSpamEmbedTagsInHtml, MarkAsSpamEmptyMessages, <br /> MarkAsSpamFormTagsInHtml, MarkAsSpamFramesInHtml, MarkAsSpamFromAddressAuthFail, <br /> MarkAsSpamJavaScriptInHtml, MarkAsSpamNdrBackscatter, MarkAsSpamObjectTagsInHtml, <br /> MarkAsSpamSensitiveWordList, MarkAsSpamSpfRecordHardFail, MarkAsSpamWebBugsInHtml, ModifySubjectValue, <br /> OutBuffer, OutVariable, QuarantineRetentionPeriod, RedirectToRecipients, RegionBlockList, SpamAction, <br /> TestModeAction, TestModeBccToRecipients, WarningAction, WarningVariable, WhatIf}</p>
<p>Name : New-HostedContentFilterPolicy<br />Parameters : {AddXHeaderValue, AdminDisplayName, BulkThreshold, Confirm, DownloadLink, EnableEndUserSpamNotifications, <br /> EnableLanguageBlockList, EnableRegionBlockList, EndUserSpamNotificationCustomFromAddress, <br /> EndUserSpamNotificationCustomFromName, EndUserSpamNotificationCustomSubject, <br /> EndUserSpamNotificationFrequency, EndUserSpamNotificationLanguage, EndUserSpamNotificationLimit, <br /> ErrorAction, ErrorVariable, HighConfidenceSpamAction, IncreaseScoreWithBizOrInfoUrls, <br /> IncreaseScoreWithImageLinks, IncreaseScoreWithNumericIps, IncreaseScoreWithRedirectToOtherPort, <br /> LanguageBlockList, MarkAsSpamBulkMail, MarkAsSpamEmbedTagsInHtml, MarkAsSpamEmptyMessages, <br /> MarkAsSpamFormTagsInHtml, MarkAsSpamFramesInHtml, MarkAsSpamFromAddressAuthFail, <br /> MarkAsSpamJavaScriptInHtml, MarkAsSpamNdrBackscatter, MarkAsSpamObjectTagsInHtml, <br /> MarkAsSpamSensitiveWordList, MarkAsSpamSpfRecordHardFail, MarkAsSpamWebBugsInHtml, ModifySubjectValue, <br /> Name, OutBuffer, OutVariable, QuarantineRetentionPeriod, RedirectToRecipients, RegionBlockList, <br /> SpamAction, TestModeAction, TestModeBccToRecipients, WarningAction, WarningVariable, WhatIf}</p>
<p>Name : Disable-HostedContentFilterRule<br />Parameters : {Confirm, ErrorAction, ErrorVariable, Identity, OutBuffer, OutVariable, WarningAction, WarningVariable, <br /> WhatIf}</p>
<p>Name : Disable-MalwareFilterRule<br />Parameters : {Confirm, ErrorAction, ErrorVariable, Identity, OutBuffer, OutVariable, WarningAction, WarningVariable, <br /> WhatIf}</p>
<p>Name : Enable-HostedContentFilterRule<br />Parameters : {Confirm, ErrorAction, ErrorVariable, Identity, OutBuffer, OutVariable, WarningAction, WarningVariable, <br /> WhatIf}</p>
<p>Name : Enable-MalwareFilterRule<br />Parameters : {Confirm, ErrorAction, ErrorVariable, Identity, OutBuffer, OutVariable, WarningAction, WarningVariable, <br /> WhatIf}</p>
<p>Name : Get-HostedConnectionFilterPolicy<br />Parameters : {ErrorAction, ErrorVariable, Identity, OutBuffer, OutVariable, WarningAction, WarningVariable}</p>
<p>Name : Get-HostedContentFilterPolicy<br />Parameters : {ErrorAction, ErrorVariable, Identity, OutBuffer, OutVariable, WarningAction, WarningVariable}</p>
<p>Name : Get-HostedContentFilterRule<br />Parameters : {ErrorAction, ErrorVariable, Identity, OutBuffer, OutVariable, State, WarningAction, WarningVariable}</p>
<p>Name : Get-HostedOutboundSpamFilterPolicy<br />Parameters : {ErrorAction, ErrorVariable, OutBuffer, OutVariable, WarningAction, WarningVariable}</p>
<p>Name : Get-MalwareFilterPolicy<br />Parameters : {ErrorAction, ErrorVariable, Identity, OutBuffer, OutVariable, WarningAction, WarningVariable}</p>
<p>Name : Get-MalwareFilterRule<br />Parameters : {ErrorAction, ErrorVariable, Identity, OutBuffer, OutVariable, State, WarningAction, WarningVariable}</p>
<p>Name : New-HostedContentFilterRule<br />Parameters : {Comments, Confirm, Enabled, ErrorAction, ErrorVariable, ExceptIfRecipientDomainIs, ExceptIfSentTo, <br /> ExceptIfSentToMemberOf, HostedContentFilterPolicy, Name, OutBuffer, OutVariable, Priority, <br /> RecipientDomainIs, SentTo, SentToMemberOf, WarningAction, WarningVariable, WhatIf}</p>
<p>Name : New-MalwareFilterPolicy<br />Parameters : {Action, AdminDisplayName, Confirm, CustomAlertText, CustomExternalBody, CustomExternalSubject, <br /> CustomFromAddress, CustomFromName, CustomInternalBody, CustomInternalSubject, CustomNotifications, <br /> EnableExternalSenderAdminNotifications, EnableExternalSenderNotifications, <br /> EnableInternalSenderAdminNotifications, EnableInternalSenderNotifications, ErrorAction, ErrorVariable, <br /> ExternalSenderAdminAddress, InternalSenderAdminAddress, Name, OutBuffer, OutVariable, WarningAction, <br /> WarningVariable, WhatIf}</p>
<p>Name : New-MalwareFilterRule<br />Parameters : {Comments, Confirm, Enabled, ErrorAction, ErrorVariable, ExceptIfRecipientDomainIs, ExceptIfSentTo, <br /> ExceptIfSentToMemberOf, MalwareFilterPolicy, Name, OutBuffer, OutVariable, Priority, RecipientDomainIs, <br /> SentTo, SentToMemberOf, WarningAction, WarningVariable, WhatIf}</p>
<p>Name : Release-QuarantineMessage<br />Parameters : {Confirm, ErrorAction, ErrorVariable, Identity, OutBuffer, OutVariable, ReleaseToAll, <br /> ReportFalsePositive, User, WarningAction, WarningVariable, WhatIf}</p>
<p>Name : Remove-HostedContentFilterPolicy<br />Parameters : {Confirm, ErrorAction, ErrorVariable, Identity, OutBuffer, OutVariable, WarningAction, WarningVariable, <br /> WhatIf}</p>
<p>Name : Remove-HostedContentFilterRule<br />Parameters : {Confirm, ErrorAction, ErrorVariable, Identity, OutBuffer, OutVariable, WarningAction, WarningVariable, <br /> WhatIf}</p>
<p>Name : Remove-MalwareFilterPolicy<br />Parameters : {Confirm, ErrorAction, ErrorVariable, Identity, OutBuffer, OutVariable, WarningAction, WarningVariable, <br /> WhatIf}</p>
<p>Name : Remove-MalwareFilterRule<br />Parameters : {Confirm, ErrorAction, ErrorVariable, Identity, OutBuffer, OutVariable, WarningAction, WarningVariable, <br /> WhatIf}</p>
<p>Name : Set-HostedContentFilterRule<br />Parameters : {Comments, Confirm, ErrorAction, ErrorVariable, ExceptIfRecipientDomainIs, ExceptIfSentTo, <br /> ExceptIfSentToMemberOf, HostedContentFilterPolicy, Identity, Name, OutBuffer, OutVariable, Priority, <br /> RecipientDomainIs, SentTo, SentToMemberOf, WarningAction, WarningVariable, WhatIf}</p>
<p>Name : Set-HostedOutboundSpamFilterPolicy<br />Parameters : {AdminDisplayName, BccSuspiciousOutboundAdditionalRecipients, BccSuspiciousOutboundMail, <br /> BlockUnlistedDomains, Confirm, ErrorAction, ErrorVariable, Identity, NotifyOutboundSpam, <br /> NotifyOutboundSpamRecipients, OutBuffer, OutVariable, WarningAction, WarningVariable, WhatIf}</p>
<p>Name : Set-MalwareFilterPolicy<br />Parameters : {Action, AdminDisplayName, Confirm, CustomAlertText, CustomExternalBody, CustomExternalSubject, <br /> CustomFromAddress, CustomFromName, CustomInternalBody, CustomInternalSubject, CustomNotifications, <br /> EnableExternalSenderAdminNotifications, EnableExternalSenderNotifications, <br /> EnableInternalSenderAdminNotifications, EnableInternalSenderNotifications, ErrorAction, ErrorVariable, <br /> ExternalSenderAdminAddress, Identity, InternalSenderAdminAddress, MakeDefault, OutBuffer, OutVariable, <br /> WarningAction, WarningVariable, WhatIf}</p>
<p>Name : Set-MalwareFilterRule<br />Parameters : {Comments, Confirm, ErrorAction, ErrorVariable, ExceptIfRecipientDomainIs, ExceptIfSentTo, <br /> ExceptIfSentToMemberOf, Identity, MalwareFilterPolicy, Name, OutBuffer, OutVariable, Priority, <br /> RecipientDomainIs, SentTo, SentToMemberOf, WarningAction, WarningVariable, WhatIf}</p>
<p>Name : Get-QuarantineMessage<br />Parameters : {Confirm, Direction, Domain, EndExpiresDate, EndReceivedDate, ErrorAction, ErrorVariable, Identity, <br /> MessageId, OutBuffer, OutVariable, Page, PageSize, RecipientAddress, Reported, SenderAddress, <br /> StartExpiresDate, StartReceivedDate, Subject, Type, WarningAction, WarningVariable, WhatIf}</p>
<p>Name : Get-QuarantineMessageHeader<br />Parameters : {ErrorAction, ErrorVariable, Identity, OutBuffer, OutVariable, WarningAction}</p>
<p><strong>OK COOL, HOW DO I REMOVE/SCOPE THIS FURTHER???</strong><br /><br /><strong>Simple! If you see a cmdlet that you don&#39;t want your support staff to run, let&#39;s say you don&#39;t want them to be able to do anything regarding the connection filters (IP Allow/Block etc), run the following:</strong></p>
<p>Remove-ManagementRoleEntry &ldquo;Transport Hygiene Limited\New-HostedConnectionFilterPolicy&rdquo;<br />Remove-ManagementRoleEntry &ldquo;Transport Hygiene Limited\Remove-HostedConnectionFilterPolicy&rdquo;<br />Remove-ManagementRoleEntry &ldquo;Transport Hygiene Limited\Set-HostedConnectionFilterPolicy&rdquo;</p>
<p><strong>This makes it so they can only read the settings but cannot execute changes if they&#39;re a member of this role.</strong></p>
<p><strong>Bonus:</strong></p>
<p>Want an easy way to see which role allows a specific cmdlet? Easy! Obviously, you can narrow it down to the cmdlet/Role if you wish, but I just dump it to an easily searchable text file.</p>
<p><strong>Get-ManagementRoleEntry *\* | fl name, parameters, role | out-file C:\temp\cmdlets.txt</strong></p>
<p>As always, I hope this helps!</p>
<p>Mitchel</p>]]></content:encoded>
    </item>
    <item>
      <title>Exchange Online: Using Regular Expressions to Match Specific Phrases in Transport Rules</title>
      <link>https://docs.microsoft.com/archive/blogs/mitchelatmicrosoft/exchange-online-using-regular-expressions-to-match-specific-phrases-in-transport-rules</link>
      <pubDate>Mon, 22 Dec 2014 21:55:00 GMT</pubDate>
      <dc:creator><![CDATA[Mitchel Lewis]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mitchelatmicrosoft/2014/12/22/exchange-online-using-regular-expressions-to-match-specific-phrases-in-transport-rules/</guid>
      <description><![CDATA[Background:
Recently a customer was dealing with a virus/spam issue that was interesting. They were...]]></description>
      <content:encoded><![CDATA[<p><span style="font-size:medium;"><strong>Background:</strong></span></p>
<p>Recently a customer was dealing with a virus/spam issue that was interesting. They were getting spammed and the subjects were intentionally misspelled by leaving a character off of the end of the word and came with a nasty virus attached. The problem is that when they created a transport rule to quarantine these malicious emails with the intentionally misspelled subjects, it was also quarantining valid emails with subjects that were spelled correctly. I honestly think that the misspellings were there intentionally so as to make it difficult to block them without causing false positives on the transport level. We were able to fix this via Regular Expressions.<br /><br /><a href="https://technet.microsoft.com/en-us/library/aa997187%28v=exchg.141%29.aspx">https://technet.microsoft.com/en-us/library/aa997187%28v=exchg.141%29.aspx</a></p>
<p><span style="font-size:medium;"><strong>Solution:</strong></span></p>
<p>1. Create a New Transport Rule</p>
<p>2. Hit &#39;More Options&#39; at the bottom</p>
<p>3. Select &#39;Apply this rule if...&#39;</p>
<p>4. Select &#39;Subject matches these text patterns&#39;</p>
<p>5. In order to match words/phrases exactly, simply put a &#39;<strong>^</strong>&#39; at the beginning of the phrase/word and a &#39;<strong>$</strong>&#39; at the end, Example:<br /><strong>^This is totally not a viru$</strong></p>
<p>6. Check&nbsp;&lsquo;Defer the message if rule processing doesn&rsquo;t complete&rsquo; at the bottom</p>
<p>Any message that comes in and meets the above criteria exactly (not more or less) will be actioned on appropriately. In this case we just sent them to quarantine, but you can reject/NDR/redirect them as you see fit.</p>
<p>-Mitchel</p>]]></content:encoded>
    </item>
    <item>
      <title>Exchange Online: Keeping your 'Inbound From Office 365' Receive Connector Current with Microsoft Public IP's</title>
      <link>https://docs.microsoft.com/archive/blogs/mitchelatmicrosoft/exchange-online-keeping-your-inbound-from-office-365-receive-connector-current-with-microsoft-public-ips</link>
      <pubDate>Mon, 22 Dec 2014 18:45:00 GMT</pubDate>
      <dc:creator><![CDATA[Mitchel Lewis]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mitchelatmicrosoft/2014/12/22/exchange-online-keeping-your-inbound-from-office-365-receive-connector-current-with-microsoft-public-ips/</guid>
      <description><![CDATA[Background:
It&#39;s not uncommon for Exchange Online support to receive the occasional call where...]]></description>
      <content:encoded><![CDATA[<p><strong><span style="font-size:medium;">Background:</span></strong></p>
<p>It&#39;s not uncommon for Exchange Online support to receive the occasional call where customers want to know how to stay on top of our public IP&#39;s. They change occasionally and unless customers are current with our RSS feeds on <a href="https://technet.microsoft.com/en-us/library/hh373144.aspx">THIS</a>&nbsp;page, then they&#39;ll likely find out that they&#39;re out of date when they start observing mail delays. Obviously, there is a better way to go about this.&nbsp;<br /><br /><span style="font-size:small;"><strong><span style="color:#ff0000;">Disclaimer:</span></strong></span><br />If you leverage your Firewall to Restrict/Allow Microsoft Public IPs, running this will likely break hybrid mail flow and should not be attempted.&nbsp;It&#39;s also worth noting that the ranges listed at&nbsp;<a href="https://technet.microsoft.com/en-us/library/hh373144.aspx" target="_blank">https://technet.microsoft.com/en-us/library/hh373144.aspx</a> will be slightly different than the results you get from running Get-HybridMailFlowDatacenterIPs. This is because the cmdlet only lists IP ranges that are specifically leveraged for mail flow and the website lists all IP ranges that the Exchange Online service uses for all of it&#39;s public facing functions, such as Client Access, EAC/ECP, Free/Busy, Migrations and of course, Mail Flow.</p>
<p><br /><span style="font-size:small;"><strong>Manual Method:</strong></span></p>
<p>1. Connect Exchange Management Shell to your tenant in Exchange Online (Refer to this link for help,&nbsp;<a href="/b/mitchelatmicrosoft/archive/2014/12/23/connecting-powershell-to-your-tenant.aspx">https://blogs.technet.com/b/mitchelatmicrosoft/archive/2014/12/23/connecting-powershell-to-your-tenant.aspx</a>&nbsp;)</p>
<p>2. Create a variable to pipe over to your Set-ReceiveConnector cmdlet</p>
<p>$FormatEnumerationLimit =-1<br />$ip = Get-HybridMailflowDatacenterIPs<br /><br />3. You can run Get-HybridMailFlowDatacenterIPs by itself to verify the results. If you don&#39;t run $FormatEnumerationLimit =-1 prior to running this, you&#39;ll see that the IP range list is not enumerated:<br />Example:<br /><br />DatacenterIPs : {65.55.88.0/24, 94.245.120.64/26, 207.46.51.64/26, 207.46.163.0/24...}<br /><br />After running&nbsp;<span>$FormatEnumerationLimit =-1 and running Get-HybridMailFlowDatacenterIPs, you should see the entire list:<br />Example:<br /></span></p>
<p>DatacenterIPs : {65.55.88.0/24, 94.245.120.64/26, 207.46.51.64/26, 207.46.163.0/24, 213.199.154.0/24,<br /> 213.199.180.128/26, 216.32.180.0/24, 216.32.181.0/24, 2a01:111:f400:7c00::/54, 23.103.128.0/20,<br /> 23.130.156.0/22, 23.103.128.0/19, 104.47.0.0/17, 23.103.198.0/23, 23.103.200.0/21, 23.103.191.0/24,<br /> 2a01:111:f400:fc00::/54, 64.4.22.64/26, 65.55.169.0/24, 65.55.83.128/27, 134.170.132.0/24,<br /> 134.170.140.0/24, 134.170.171.0/24, 157.55.133.160/27, 157.55.158.0/23, 157.55.234.0/24,<br /> 157.55.206.0/23, 157.56.73.0/24, 157.56.87.192/26, 157.56.108.0/24, 157.56.110.0/24, 157.56.111.0/24,<br /> 157.56.112.0/24, 157.56.206.0/24, 157.56.208.0/22, 207.46.100.0/24, 207.46.101.128/26}<br /><br />4. Once you have verified that you&#39;re seeing all of the IP ranges, you can feed them into a Set-ReceiveConnector cmdlet<br /><br />Get-ReceiveConnector &quot;Inbound From Office 365&quot; | Set-ReceiveConnector -RemoteIPRanges $ip.DatacenterIP<span style="font-size:12px;">s</span></p>
<p><span style="font-size:12px;">5. Run Get-ReceiveConnector &quot;Inbound From Office 365&quot; | fl Identity,RemoteIPRanges to verify that the IP ranges are current</span></p>
<p><span><strong>Entire Script to paste into EMS:</strong><br /><br /><span>$FormatEnumerationLimit =-1</span><br /><span>$ip = Get-HybridMailflowDatacenterIPs<br /><span>Get-ReceiveConnector &quot;Inbound From Office 365&quot; | Set-ReceiveConnector -RemoteIPRanges $ip.DatacenterIP</span><span>s</span></span><br /></span></p>
<p><strong><span style="font-size:small;">Scripted Method:</span><br /></strong>Would you like to just run a script to do this? No problem!<br /><br />1. Compile this script into a .PS1 file and modify the identity of the receive connector accordingly as well as the username after Get-Credential</p>
<p>$FormatEnumerationLimit =-1<br />$O365Cred = Get-Credential YourTenantAdmin@tenant.onmicrosoft.com<br />$O365Session = New-PSSession &ndash;ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $O365Cred -Authentication Basic -AllowRedirection<br />Import-PSSession $O365Session<br />$ip = Get-HybridMailflowDatacenterIPs<br />Get-ReceiveConnector &quot;Receive Connector Name&quot; | Set-ReceiveConnector -RemoteIPRanges $ip.datacenterips<br /><br />2. Once you have this saved into .ps1 file, simply run it in Exchange Management Shell, type in your password and wait for it to complete, it should only take a matter of seconds.</p>
<p><br /><strong><span style="font-size:small;">Script/Scheduled Task Method:</span><br /></strong>Want it to just run for you? No problem! It involves caching a Tenant Admin password in your powershell script though.<br /><br />1.&nbsp;<span>&nbsp;Compile this script into a .PS1 file, name it HybridIPs.PS1, throw it in the folder C:\Scripts (or change the file location in the script) and modify the identity of the receive connector accordingly as well as the username and password:<br /></span></p>
<p>$FormatEnumerationLimit =-1<br />$Pass = ConvertTo-SecureString &quot;ReplaceWithPlainTextPassword&quot; -AsPlainText -Force<br />$O365Cred = New-Object System.Management.Automation.PSCredential (&quot;YourTenantAdmin@tenant.onmicrosoft.com&quot;, $Pass)<br />$O365Session = New-PSSession &ndash;ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $O365Cred -Authentication Basic -AllowRedirection<br />Import-PSSession $O365Session<br />$ip = Get-HybridMailflowDatacenterIPs<br />Get-ReceiveConnector &quot;Receive Connector Name&quot; | Set-ReceiveConnector -RemoteIPRanges $ip.datacenterips<br />Start-Sleep -S 10<br />Exit<br /><br />2. Run powershell as an Administrator on your Hybrid Server and run the following command:<br />Set-ExecutionPolicy Unrestricted<br /><br />3. Create a Basic Task, name it appropriately, set your desired time and interval and select it to Start a Program. In the Program/script field, paste in the following:<br />C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe<br /><br />A. If you&#39;re on Exchange 2013 Hybrid, add the following into &#39;Add arguments (optional)&#39; field:</p>
<p>-command &quot;. &#39;C:\Program Files\Microsoft\Exchange Server\V15\bin\RemoteExchange.ps1&#39;; Connect-ExchangeServer -auto; C:\Scripts\.\hybridips.ps1&quot;<br /><br />B. If you&#39;re on Exchange 2010 Hybrid, add the following into &#39;Add arguments (optional)&#39; field:</p>
<p>-version 2.0 -command &quot;. &#39;C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1&#39;; Connect-ExchangeServer -auto; C:\scripts\.\hybridips.ps1&quot;<br /><br />Then give it a try. You should see Powershell open and run through its&#39; motions. If you run into any issues, feel free to ask me in the comments section.<br /><br />I hope this helps! I may be updating this in the very near future with a script to account for any/all potential failures as well as logging changes.</p>
<p>-Mitchel</p>]]></content:encoded>
    </item>
    <item>
      <title>Connecting Powershell to your Office 365 Tenant to Manage Exchange and Azure AD Simultaneously</title>
      <link>https://docs.microsoft.com/archive/blogs/mitchelatmicrosoft/connecting-powershell-to-your-office-365-tenant-to-manage-exchange-and-azure-ad-simultaneously</link>
      <pubDate>Mon, 22 Dec 2014 16:11:00 GMT</pubDate>
      <dc:creator><![CDATA[Mitchel Lewis]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mitchelatmicrosoft/2014/12/22/connecting-powershell-to-your-office-365-tenant-to-manage-exchange-and-azure-ad-simultaneously/</guid>
      <description><![CDATA[Background:
A common question that we have to go over with customers that are new to this service...]]></description>
      <content:encoded><![CDATA[<p><strong><span style="font-size:medium;">Background:</span></strong></p>
<p>A common question that we have to go over with customers that are new to this service is how to connect to the tenant via Powershell. Here&#39;s how I go about it.</p>
<p><strong>Pre-Requisites:</strong></p>
<p>Install the following components</p>
<p><strong>Sign-In Assistant:</strong></p>
<p>https://www.microsoft.com/en-us/download/details.aspx?id=39267</p>
<p><strong>Azure AD cmdlets:</strong></p>
<p>https://go.microsoft.com/fwlink/p/?linkid=236297</p>
<p></p>
<p><span style="font-size:medium;"><strong>Easy Method:</strong></span></p>
<p>Copy and paste the following into powershell. Update YourTenantAdmin@tenant.onmicrosoft.com to your tenant admin account</p>
<p>Import-Module MSOnline<br />$O365Cred = Get-Credential YourTenantAdmin@tenant.onmicrosoft.com<br />$O365Session = New-PSSession &ndash;ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $O365Cred -Authentication Basic -AllowRedirection<br />Import-PSSession $O365Session<br />Connect-MsolService &ndash;Credential $O365Cred</p>
<p>Powershell will prompt you for a password and will connect to the tenant<br /><br /></p>
<p><strong><span style="font-size:medium;">Advanced:</span><br /><br />Pre-Requesite</strong></p>
<p>Run powershell as an Administrator and run the following:</p>
<p><strong>Set-ExecutionPolicy Unrestricted</strong></p>
<p><strong>1. Scripted Method w/ Password Prompt<br /></strong>Convert the easy method above into a powershell script / .PS1 file:<strong><br /></strong></p>
<p>Import-Module MSOnline<br />$O365Cred = Get-Credential&nbsp;<span>YourTenantAdmin@tenant.onmicrosoft.com</span><br />$O365Session = New-PSSession &ndash;ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $O365Cred -Authentication Basic -AllowRedirection<br />Import-PSSession $O365Session<br />Connect-MsolService &ndash;Credential $O365Cred</p>
<p>Run it and Powershell will prompt only for your password and connect to the service</p>
<p><strong>2. Script + Saved password (<span style="color:#ff0000;">Warning: Your password will be saved in plain text in order for this to work</span>).</strong><br />Change PlainTextPassword to your password and change YourTenantAdmin@tenant.onmicrosoft.com to your tenant admin UPN, save it as a .PS1 File</p>
<p>Import-Module MSOnline<br />$SecPass = ConvertTo-SecureString &quot;PlainTextPassword&quot; -AsPlainText -Force<br />$O365Cred = New-Object System.Management.Automation.PSCredential (&quot;YourTenantAdmin@tenant.onmicrosoft.com&quot;, $SecPass)<br />$O365Session = New-PSSession &ndash;ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $O365Cred -Authentication Basic -AllowRedirection<br />Import-PSSession $O365Session<br />Connect-MsolService &ndash;Credential $O365Cred</p>
<p>Run it and Powershell will then connect to your O365 Tenant without a credential prompt. This method is very convenient, but I would only recommend it when running it as part of a process/scheduled task where you don&#39;t want a credential prompt or manually intervene. However, you can use it to connect to the tenant if you are not concerned with the security risks.</p>
<p>I hope it helps!</p>
<p>-Mitchel</p>]]></content:encoded>
    </item>
  </channel>
</rss>