<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Marcelo Hunecke - Exchange and Office 365 PFE blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/mhunecke/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/mhunecke/feed.xml</link>
    <description />
    <lastBuildDate>Tue, 16 Apr 2019 06:28:07 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Como configurar o Office 365 para autenticar no NetIQ NAM</title>
      <link>https://docs.microsoft.com/archive/blogs/mhunecke/como-configurar-o-office-365-para-autenticar-no-netiq-nam</link>
      <pubDate>Wed, 05 Jul 2017 12:40:17 GMT</pubDate>
      <dc:creator><![CDATA[Marcelo Hunecke]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mhunecke/?p=1705</guid>
      <description><![CDATA[A partir de 2016, o Office 365 passou a suportar STS (Security Token Service) de terceiros. Para...]]></description>
      <content:encoded><![CDATA[A partir de 2016, o Office 365 passou a suportar STS (Security Token Service) de terceiros. Para isso, é necessário habilitar ADAL (Active Directory Authetication Library), que no Office 365 se chama Modern Authentication.

A lista de STS suportados para o Office 365 está disponível em: <a href="https://docs.microsoft.com/en-us/azure/active-directory/connect/active-directory-aadconnect-federation-compatibility" title="https://docs.microsoft.com/en-us/azure/active-directory/connect/active-directory-aadconnect-federation-compatibility">https://docs.microsoft.com/en-us/azure/active-directory/connect/active-directory-aadconnect-federation-compatibility</a>

No Office 365, a feature de Modern Authentication já vem habilitada, por padrão, para todos os componentes, exceto Exchange Online e Skype for Business Online. Para o correto funcionamento da autenticação com STSs de terceiros será necessário habilitar essa feature para Exchange Online e Skype for Business Online (passos 1 e 2 abaixo).

Habilitar Mothern Authentication significa alterar o modo de autenticação do Outlook e do cliente Skype for Business de Active Mode (usando WS-Trust protocol) para Passive Mode (usando WS-Federation ou SAML 2.0 protocol).

Para configurar os componentes do Office 365 para autenticar no NAM (NetIQ Authetication Manager), ao invés do Microsoft ADFS, siga os passos abaixo:

1) Habilitar Modern Authentication no Exchange Online usando o cmdlet PowerShell:

<span style="font-family: Courier New">Set-OrganizationConfig -OAuth2ClientProfileEnabled:$true</span>

2) Habilitar Modern Authentication no Skype for Business Online usando o cmdlet PowerShell:

<span style="font-family: Courier New">Set-CsOAuthConfiguration -ClientAdalAuthOverride Allowed</span>

3) Configurar o NAM conforme documentação da NetIQ disponível no link: <a href="https://www.netiq.com/documentation/access-manager-43/admin/data/b65ogn0.html#b12ir4yc">https://www.netiq.com/documentation/access-manager-43/admin/data/b65ogn0.html#b12iqp0m, clique na sessão: Section 5.2.13, Configuring Single Sign-On for Office 365 Services</a>.

OBS.: Escolher a opção "Configuring an Office 365 Domain That Supports Passive Federation by using SAML 2.0"

4) Configurar a federação do domínio no Azure AD usando os seguintes cmdlets PowerShell:

<span style="font-family: Courier New">$dom = "hunecke.com.br"
</span><span style="font-family: Courier New">$url = "</span><a href="https://idsqa.hunecke.net/nidp/saml2/sso"><span style="font-family: Courier New">https://idsqa.hunecke.net/nidp/saml2/sso</span></a><span style="font-family: Courier New">"
</span><span style="font-family: Courier New">$ecpUrl = "</span><a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fidsqa.valeglobal.net%2Fnidp%2Fsaml2%2Fsoap&amp;data=02%7C01%7Cmhunecke%40microsoft.com%7Cb68668bc790e4723976508d493ba9b60%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636295877086655902&amp;sdata=A6k2hpC4wK5Y3GHhqvE2Sf8lr2%2FmCMAq2blnjJD5ntQ%3D&amp;reserved=0"><span style="font-family: Courier New">https://idsqa.hunecke.net/nidp/saml2/soap</span></a><span style="font-family: Courier New">"
</span><span style="font-family: Courier New">$uri = "</span><a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fidsqa.valeglobal.net%2Fnidp%2Fsaml2%2Fmetadata&amp;data=02%7C01%7Cmhunecke%40microsoft.com%7Cb68668bc790e4723976508d493ba9b60%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636295877086655902&amp;sdata=gaDCZW7%2B%2F0jDkDh2YdXX7S3pmvpXkp1o3iQseKQ0zF4%3D&amp;reserved=0"><span style="font-family: Courier New">https://idsqa.hunecke.net/nidp/saml2/metadata</span></a><span style="font-family: Courier New">"
</span><span style="font-family: Courier New">$logouturl = "</span><a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fidsqa.valeglobal.net%2Fnidp%2Fjsp%2Fo365Logout.jsp&amp;data=02%7C01%7Cmhunecke%40microsoft.com%7Cb68668bc790e4723976508d493ba9b60%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636295877086655902&amp;sdata=uHADWqCsYV17ql6lJuWKi6FiOBaIzGp20uxXRfwDnXI%3D&amp;reserved=0"><span style="font-family: Courier New">https://idsqa.hunecke.net/nidp/jsp/o365Logout.jsp</span></a><span style="font-family: Courier New">"
</span><span style="font-family: Courier New">$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2 ("c:\Nam_certificate_with_private_key_2017.pfx", "Password")
</span><span style="font-family: Courier New">$certData = [system.convert]::tobase64string($cert.rawdata) </span>

<span style="font-family: Courier New">Set-MsolDomainAuthentication -DomainName Hunecke.com.br -FederationBrandName $dom -Authentication Federated -PassiveLogOnUri $url -SigningCertificate $certData -IssuerUri $uri -ActiveLogOnUri $ecpUrl -LogOffUri $logouturl -PreferredAuthenticationProtocol SAMLP</span>

&nbsp;

Observações:

1) No passo 1, antes de executar o cmdlet PowerShell é necessário conectar no Exchange Online.

2) No passo 2, é necessário conectar no Skype for Business Online.

3) No passo 3, é necessario se conectar a0 Azure AD.

2) No passo 4, o domínio <strong>hunecke.com.br</strong> é o domínio SMTP público e <strong>hunecke.net</strong> é o domínio do Active Directory (URLs públicas do NAM).

&nbsp;

Print Screen da autenticação do Office 365 via NAM.
<ul>
 	<li>Office 365 Portal:</li>
</ul>
&nbsp;

<a href="https://msdnshared.blob.core.windows.net/media/2017/07/NAM-O365-autentication.png"><img width="300" height="271" class="alignnone size-medium wp-image-1755" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/07/NAM-O365-autentication-300x271.png" /></a>
<ul>
 	<li>NAM Portal:</li>
</ul>
<a href="https://msdnshared.blob.core.windows.net/media/2017/07/NAM-Autentication.png"><img width="300" height="267" class="alignnone size-medium wp-image-1745" alt="" src="https://msdnshared.blob.core.windows.net/media/2017/07/NAM-Autentication-300x267.png" /></a>]]></content:encoded>
    </item>
    <item>
      <title>Renovação do certificado do ADFS e ADFS Proxy</title>
      <link>https://docs.microsoft.com/archive/blogs/mhunecke/renovacao-do-certificado-do-adfs-e-adfs-proxy</link>
      <pubDate>Thu, 23 Feb 2017 19:34:49 GMT</pubDate>
      <dc:creator><![CDATA[Marcelo Hunecke]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mhunecke/?p=1695</guid>
      <description><![CDATA[Antes de iniciar o processo, instalar o certificado via certlm.msc em todos os servidores ADFS e...]]></description>
      <content:encoded><![CDATA[Antes de iniciar o processo, instalar o certificado via <strong><em>certlm.msc</em></strong> em todos os servidores ADFS e ADFS Proxy.

<strong>Nos servidores ADFS executar os seguintes passos: </strong>

1) Identificar o Thumbprint do novo certificado com o seguinte comando PowerShell:

<span style="font-family: Courier New">Get-ChildItem -Path cert:\LocalMachine\my | FL FriendlyName, Thumbprint, Subject, NotBefore, NotAfter</span>

2) Atualizar o ceritficado no servidor ADFS primário executando o seguinte comando PowerShell:

<span style="font-family: Courier New">Set-AdfsCertificate -CertificateType Service-Communications -Thumbprint &lt;thumbprint&gt;
Set-AdfsSslCertificate -Thumbprint &lt;thumbprint&gt;</span>

3) Reiniciar o serviço do ADFS em cada um dos servidores com o seguinte comando PowerShell:

<span style="font-family: Courier New">Restart-Service adfssrv</span>

4) Confirmar que os servidores ADFS reconheceram o novo certificado com os seguintes comandos PowerShell:

<span style="font-family: Courier New">Get-AdfsCertificate
Get-AdfsSslCertificate</span>

<strong>Nos servidores ADFS Proxy (Web Application Proxy) executar os seguintes passos: </strong>

1) Identificar o Thumbprint do novo certificado com o seguinte comando PowerShell:

<span style="font-family: Courier New">Get-ChildItem -Path cert:\LocalMachine\my | FL FriendlyName, Thumbprint, Subject, NotBefore, NotAfter</span>

1) Atualizar o ceritficado em cada um dos servidores ADFS Proxy executando o seguinte comando PowerShell:

<span style="font-family: Courier New">Set-WebApplicationProxySslCertificate -Thumbprint &lt;thumbprint&gt;</span>

2) Reiniciar o serviço do ADFS Proxy em cada um dos servidores com o seguinte comando PowerShell:

<span style="font-family: Courier New">Restart-Service adfssrv</span>

3) Confirmar que os servidores ADFS reconheceram o novo certificado com os seguintes comandos PowerShell:

<span style="font-family: Courier New">Get-WebApplicationProxySslCertificate</span>]]></content:encoded>
    </item>
    <item>
      <title>Single Sign-On (SSO) do Office 365 usando Google Chrome</title>
      <link>https://docs.microsoft.com/archive/blogs/mhunecke/single-sign-on-sso-do-office-365-usando-google-chrome</link>
      <pubDate>Fri, 17 Jun 2016 19:01:35 GMT</pubDate>
      <dc:creator><![CDATA[Marcelo Hunecke]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mhunecke/?p=1686</guid>
      <description><![CDATA[Até o mês passado (Maio/2016) o Chrome tinha uma limitação para acesso ao ADFS com Single Sign-On...]]></description>
      <content:encoded><![CDATA[Até o mês passado (Maio/2016) o Chrome tinha uma limitação para acesso ao ADFS com Single Sign-On (SSO).

Como o Chrome não implementava uma função chamada “<strong>ExtendedProtectionTokenCheck”</strong>, para funcionar era necessário baixar a segurança do ADFS rodando “<strong>Set-ADFSProperties –ExtendedProtectionTokenCheck None</strong>”, e muitos clientes não faziam isso, por questões de segurança.

Em Maio de 2016 foi lançado o Chrome v.51.0.2784 que corrige esse problema e o Chrome consegue fazer SSO com ADFS, sem baixar a segurança do ADFS.

Lembrando que o SSO com Chrome não é automático com ADFS, é preciso adicionar o User-Agent do Chrome (Mozilla/5.0) no ADFS com o seguinte comando:

<b>Set-ADFSProperties -WIASupportedUserAgents @(“MSIE 6.0”, “MSIE 7.0”, “MSIE 8.0”, “MSIE 9.0”, “MSIE 10.0”, “Trident/7.0”, “MSIPC”, “Windows Rights Management Client”, “Mozilla/5.0”,”Edge/12”)</b>

OBS.: Nessa linha de comando acima, já está sendo adicionado o User-Agent do Edge também.

<strong>Ações importantes:</strong>
<ul>
	<li>Atualizar o Chrome para v.51.0.2784 ou superior;</li>
	<li>No ADFS, para quem baixou a segurança, rodar o comando “<strong>Set-ADFSProperties –ExtendedProtectionTokenCheck Required</strong>”;</li>
	<li>Fazer backup dos user-agents já configurados no ADFS com o commando <strong>Get-ADFSProperties;</strong></li>
	<li>No ADFS adicionar o User-Agent para o Chrome rodando o comando “<strong>Set-ADFSProperties -WIASupportedUserAgents @(“MSIE 6.0”, “MSIE 7.0”, “MSIE 8.0”, “MSIE 9.0”, “MSIE 10.0”, “Trident/7.0”, “MSIPC”, “Windows Rights Management Client”, “Mozilla/5.0”,”Edge/12”).</strong></li>
</ul>
<strong>Ref. <a href="http://jackstromberg.com/2014/03/adfs-v3-on-server-2012-r2-allow-chrome-to-automatically-sign-in-internally/">http://jackstromberg.com/2014/03/adfs-v3-on-server-2012-r2-allow-chrome-to-automatically-sign-in-internally/</a></strong><strong> (este post ainda não foi atualizado)</strong>

<strong>Ref. <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=270219">https://bugs.chromium.org/p/chromium/issues/detail?id=270219</a> </strong>

&nbsp;]]></content:encoded>
    </item>
    <item>
      <title>Dicas de configuração dos conectores do Exchange em ambiente híbrido</title>
      <link>https://docs.microsoft.com/archive/blogs/mhunecke/dicas-de-configurao-dos-conectores-do-exchange-em-ambiente-hbrido</link>
      <pubDate>Thu, 14 Apr 2016 20:33:28 GMT</pubDate>
      <dc:creator><![CDATA[Marcelo Hunecke]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mhunecke/2016/04/14/dicas-de-configurao-dos-conectores-do-exchange-em-ambiente-hbrido/</guid>
      <description><![CDATA[Existe uma série de combinações de ambiente suportados para conectar Exchange On-Premise com...]]></description>
      <content:encoded><![CDATA[Existe uma série de combinações de ambiente suportados para conectar Exchange On-Premise com Exchange Online montando um ambiente híbrido.

A versão mínima de Exchange Server que permite a conexão com o Exchange Online (Office 365) é Exchange 2010, logo, não está sendo considerado cenários com Exchange 2007. Cenário com Exchange 2007 precisam pelo menos um servidor Exchange 2010 ou superior (conhecido como Hydrid Server)

Segue a tabela de possíveis cenários suportados:
<table width="611" border="2" cellspacing="0" cellpadding="2">
<tbody>
<tr>
<td width="56" valign="top"><b>Cenário</b></td>
<td width="291" valign="top"><b>Versão de Exchange Server mais recente dentro da organização (exceto Edge)</b></td>
<td width="260" valign="top"><b>Versão do Edge Server</b></td>
</tr>
<tr>
<td width="56" valign="top">
<p align="center"><strong>1</strong></p>
</td>
<td width="291" valign="top">Exchange 2010</td>
<td width="260" valign="top">Sem Edge</td>
</tr>
<tr>
<td width="56" valign="top">
<p align="center"><strong>2</strong></p>
</td>
<td width="291" valign="top">Exchange 2010</td>
<td width="260" valign="top">Edge 2010</td>
</tr>
<tr>
<td width="56" valign="top">
<p align="center"><strong>3</strong></p>
</td>
<td width="291" valign="top">Exchange 2010 SP3 Update Rollup 5</td>
<td width="260" valign="top">Edge 2013 (1)</td>
</tr>
<tr>
<td width="56" valign="top">
<p align="center"><strong>4</strong></p>
</td>
<td width="291" valign="top">Exchange 2010 SP3 Update Rollup 11</td>
<td width="260" valign="top">Edge 2016 (2)</td>
</tr>
<tr>
<td width="56" valign="top">
<p align="center"><strong>5</strong></p>
</td>
<td width="291" valign="top">Exchange 2013</td>
<td width="260" valign="top">Sem Edge</td>
</tr>
<tr>
<td width="56" valign="top">
<p align="center"><strong>6</strong></p>
</td>
<td width="291" valign="top">Exchange 2013</td>
<td width="260" valign="top">Edge 2010 SP3 Update Rollup 5 (1)</td>
</tr>
<tr>
<td width="56" valign="top">
<p align="center"><strong>7</strong></p>
</td>
<td width="291" valign="top">Exchange 2013</td>
<td width="260" valign="top">Edge 2013</td>
</tr>
<tr>
<td width="56" valign="top">
<p align="center"><strong>8</strong></p>
</td>
<td width="291" valign="top">Exchange 2013 Cumulative Update 10 (2)</td>
<td width="260" valign="top">Edge 2016</td>
</tr>
<tr>
<td width="56" valign="top">
<p align="center"><strong>9</strong></p>
</td>
<td width="291" valign="top">Exchange 2016</td>
<td width="260" valign="top">Sem Edge</td>
</tr>
<tr>
<td width="56" valign="top">
<p align="center"><strong>10</strong></p>
</td>
<td width="291" valign="top">Exchange 2016</td>
<td width="260" valign="top">Exchange 2010 SP3 Update Rollup 11 (2)</td>
</tr>
<tr>
<td width="56" valign="top">
<p align="center"><strong>11</strong></p>
</td>
<td width="291" valign="top">Exchange 2016</td>
<td width="260" valign="top">Edge 2013 Cumulative Update 10 (2)</td>
</tr>
<tr>
<td width="56" valign="top">
<p align="center"><strong>12</strong></p>
</td>
<td width="291" valign="top">Exchange 2016</td>
<td width="260" valign="top">Edge 2016</td>
</tr>
</tbody>
</table>
(1) Exchange 2013 system requirements
<a href="https://technet.microsoft.com/en-us/library/aa996719(v=exchg.150).aspx" title="https://technet.microsoft.com/en-us/library/aa996719(v=exchg.150).aspx">https://technet.microsoft.com/en-us/library/aa996719(v=exchg.150).aspx</a>

(2) Exchange 2016 system requirements
<a href="https://technet.microsoft.com/en-us/library/aa996719(v=exchg.160).aspx">https://technet.microsoft.com/en-us/library/aa996719(v=exchg.160).aspx</a>

De forma geral, a conexão entre os ambientes Exchange é configurada com a execução do HCW (Hibrid Configuration Wizard), mas existem uma série de configuração adicionais requeridas para o perfeito funcionamento do fluxo de mensagens entre o Exchange OnPremise e o Exchange Online. Lembrando que o cenário que foi testado utilizou o Standalone Hybrid Configuration Wizard (sHCW) disponível em: <a href="https://aka.ms/HybridWizard">https://aka.ms/HybridWizard</a>.

O log do novo HCW fica disponível em: %appdata%\Microsoft\Exchange Hybrid Configuration.

Segue abaixo o detalhamento de todas as configurações adicionais que devem ser ajustadas nos Conectores do Exchange para cada cenário:
<h2><strong>Cenários 1, 5 e 9:</strong></h2>
Rodar o HCW sem necessidade de qualquer alteração nos conectores.
<h2><strong>Cenário 2:</strong></h2>
Rodar HCW e fazer os seguintes ajustes::
<ol>
 	<li>No Exchange Manangement, em cada um dos servidores Hub Transport remover o Receive Connector “<strong><em>Inbound from Office 365</em></strong>”</li>
 	<li>No Exchange Manangement, remover os servidores Hub Transport do Send Connector “<strong><em>Outbound to Office 365</em></strong>” e adicionar os servidores Edge (necessário digitar o nome dos Edges)</li>
 	<li>No Exchange Manangement Shell, configurar o Receive Connector default da Internet em cada servidor Edge usando o comando PowerShell abaixo:</li>
</ol>
<span style="font-family: Courier New">Set-ReceiveConnector –Identity "<strong><em>&lt;ServerName&gt;\Default internal receive connector &lt;ServerName&gt;</em></strong>" -TlsDomainCapabilities mail.protection.outlook.com:AcceptOorgProtocol –Fqdn &lt;FQDN_publico_do Edge&gt;</span>
<h2><strong>Cenários 3 e 4:</strong></h2>
Rodar HCW e fazer os seguintes ajustes::
<ol>
 	<li>No ADSIEdit.msc, no caminho <em>CN=Outbound to Office 365,CN=Connections,CN=Exchange Routing Group (DWBGZMFD01QNBJR),CN=Routing Groups,CN=Exchange Administrative Group (FYDIBOHF23SPDLT),CN=Administrative Groups,CN=&lt;Org&gt;,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=&lt;domain&gt;,DC=&lt;domain&gt;</em> alterar o atributo <strong><u><em>msExchSmtpSendFlags</em></u></strong> de 64 para 131136 (ver mais infos sobre esse atributo ao final do post).</li>
 	<li>Force a execução do EdgeSync via PowerShell usando Start-EdgeSubscription</li>
 	<li>No Exchange Manangement, em cada um dos servidores Hub Transport remover o Receive Connector “<strong><em>Inbound from Office 365</em></strong>”</li>
 	<li>No Exchange Manangement, remover os servidores Hub Transport do Send Connector “<strong><em>Outbound to Office 365</em></strong>” e adicionar os servidores Edge (necessário digitar o nome dos Edges)</li>
 	<li>No Exchange Manangement Shell, configurar o Receive Connector default da Internet em cada servidorEdge usando o comando PowerShell abaixo:</li>
</ol>
<span style="font-family: Courier New">Set-ReceiveConnector –Identity "<strong><em>&lt;ServerName&gt;\Default internal receive connector &lt;ServerName&gt;</em></strong>" -TlsDomainCapabilities mail.protection.outlook.com:AcceptOorgProtocol –Fqdn &lt;FQDN_publico_do Edge&gt;</span>
<h2><strong>Cenários 6, 7, 8, 10, 11 e 12:</strong></h2>
Rodar HCW e fazer os seguintes ajustes::
<ol>
 	<li>No Exchange Manangement Shell, configurar o Receive Connector default da Internet em cada servidor Edge usando o comando PowerShell abaixo:</li>
</ol>
<span style="font-family: Courier New">Set-ReceiveConnector –Identity "<strong><em>&lt;ServerName&gt;\Default internal receive connector &lt;ServerName&gt;</em></strong>" -TlsDomainCapabilities mail.protection.outlook.com:AcceptOorgProtocol –Fqdn &lt;FQDN_publico_do Edge&gt;</span>

&nbsp;

<span style="font-size: large">Informações sobre o atributo  <strong><u><em>msExchSmtpSendFlags:</em></u></strong></span>

O atributo <strong><u><em>msExchSmtpSendFlags </em></u></strong>ajustado via ADSIEdit.msc nos cenários 3 e 4 representa o atributo <strong><em>CloudServicesMailEnabled</em> </strong>do SendConnector via PowerShell. Como este parâmetro foi introduzido no Exchange 2013, não é possível alterar o atributo via PowerShell no Exchange 2010, logo, é necessário modificar via ADSIEdit.msc. No ADSIEdit.msc  o valor 16 representa o valor $False do PowerShell e o valor 131136 representa o valor $True.

Esse atributo precisa ser alterado no cenário de Exchange 2010 com Edge 2013/2016, pois o Send Connector é criado pelo HCW nos servidores Hub Transport (Exchange 2010), mas é executado nos servidores Edge (Exchange 2013), por isso, é necessário ter o atributo com valor $True (ou 131136).

Este valor deve ser $True (ou 131136) para preserver o cabeçalho entre os ambientes Exchange OnPremise e Exchange Online, dessa forma a mensagem é “marcada” como internal. Isso pode ser visto no cabeçalho das mensagens no atributo <strong><em>X-MS-Exchange-Organization-AuthAs.</em></strong> Se este atributo estiver com valor Anonymous é muito provável que este atributo esteja com valor $False (ou 16).

&nbsp;

* * Contribuição do PFE <strong><u>Rafael Mantovani.</u></strong>]]></content:encoded>
    </item>
    <item>
      <title>Como instalar Exchange Server 2013 Edge</title>
      <link>https://docs.microsoft.com/archive/blogs/mhunecke/como-instalar-exchange-server-2013-edge</link>
      <pubDate>Tue, 08 Dec 2015 19:53:44 GMT</pubDate>
      <dc:creator><![CDATA[Marcelo Hunecke]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mhunecke/2015/12/08/como-instalar-exchange-server-2013-edge/</guid>
      <description><![CDATA[A instalação da Role Edge do Exchange Server é bem simples, mas tem algumas “pegadinhas”, por isso,...]]></description>
      <content:encoded><![CDATA[<p>A instalação da Role Edge do Exchange Server é bem simples, mas tem algumas “pegadinhas”, por isso, preferi documentar:</p> <p>Antes de começar faça a configuração das placas de rede e endereços IP, DNS, etc.</p> <p>1) Adicione o sufixo ao nome dos Servidores Edge. Ex.: edge01.<strong>hunecke.net</strong> e reinicie o computador.</p> <p>2)&nbsp; Faça a instalação dos pré-requisitos via UI ou através do comando PowerShell abaixo:</p> <p><strong>Add-WindowsFeature ADLDS,Telnet-Client</strong></p> <p>3) Faça a instalação dos servidores Edge via UI ou através do comando PowerShell abaixo:</p> <p><strong>Setup.exe /Mode:Install /Roles:EdgeTransport /IAcceptExchangeServerLicenseTerms</strong></p> <p>4) O serviço <strong>Microsoft Exchange Health Manager</strong> não deve iniciar automaticamente, por um erro no código do setup do Exchange, conforme artigo: <a href="http://support.microsoft.com/en-us/kb/3017629" target="_blank">http://support.microsoft.com/en-us/kb/3017629</a>. Abra o regedit.exe, navegue até HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\MSExchangeHM, abra a entrada <strong>DependOnService</strong> e remova o valor <strong>MSExchangeADTopology.</strong> Reinicie o servidor<strong>.</strong></p> <p><font style="background-color:#ffff00;"></font>5) Copie o arquivo *.pfx com o certificado público para os servidores Edge. Importe o certificado via MMC e Instale o certificado nos servidores Edge através do comando PowerShell abaixo:</p> <p><strong>Enable-ExchangeCertificate -Thumbprint 9245E167E25223D85BF799982AE1A4848D6DA04A -Services:smtp</strong></p> <p>Na pergunta sobre sobrescrever ou não o cerificado default do serviço SMTP é obrigátório responder <strong>“Não”.&nbsp; </strong>Em breve, farei um post específico sobre este assunto e coloco no link.</p> <p>OBS1.: Se vc estiver utilizando os servidores Edge para conexão com Office 365, o certificado deve ser o mesmo utilizado nos servidores Mailbox e CAS.<strong> </strong></p> <p>OBS2.: Qualquer alteração feita nos certificados requer que um novo Edge subscription seja refeito.</p> <p>6) Nos servidores Edge, crie uma Edge Subscription para cada servidor, através do comando PowerShell abaixo (pressione Y para confirmar):</p> <p><strong>New-EdgeSubscription –FileName “c:\MyEdgeSubscription-Edge01.xml”</strong></p> <p><strong>New-EdgeSubscription –FileName “c:\MyEdgeSubscription-Edge02.xml”</strong></p> <p>7) Confirme que os todos os servidores Mailbox conseguem resolver o FQDN dos servidores Edge.</p> <p>8) Crie uma regra de firewall em todos servidores Mailbox liberando a porta 50636 para conexão com os servidores Edge, através dos comandos PowerShell abaixo:</p> <p><strong>Invoke-Command –ComputerName Mailbox01.hunecke.net {New-NetFirewallRule -DisplayName &quot;Allow outbound TCP Port 50636 - Edge Service&quot; -Direction outbound –LocalPort 50636 -Protocol TCP -Action Allow}</strong></p> <p><strong>Invoke-Command –ComputerName Mailbox02.hunecke.net {New-NetFirewallRule -DisplayName &quot;Allow outbound TCP Port 50636 - Edge Service&quot; -Direction outbound –LocalPort 50636 -Protocol TCP -Action Allow}</strong></p> <p>9) Copie os arquivos gerado no passo 6 e configure a replicação do Edge para apenas um servidor Mailbox através do comando PowerShell abaixo:</p> <p><strong>New-EdgeSubscription -FileData ([byte[]]$(Get-Content -Path “c:\MyEdgeSubscription-Edge01.xml” -Encoding Byte -ReadCount 0)) -Site “Default-First-Site-Name”</strong>  <p><strong>New-EdgeSubscription -FileData ([byte[]]$(Get-Content -Path “c:\MyEdgeSubscription-Edge01.xml” -Encoding Byte -ReadCount 0)) -Site “Default-First-Site-Name”</strong>  <p>10) Inicie a replicação da configuração entre os servidores Edge e os servidores Mailbox (executando em qualquer servidor Mailbox) através do comando PowerShell abaixo: </p> <p><strong>Start-EdgeSynchronization</strong></p> <p>10) Nos Servidores Edge, instale o Product Key via UI ou através do comando PowerShell abaixo:</p> <p><strong>Set-ExchangeServer -Identity edgeserver -ProductKey aaaaa-aaaaa-aaaaa-aaaaa-aaaaa</strong></p> <p>11) Caso vocês esteja utilizando os Servidores Edge para conectar com o Office 365, após a execução do Hybrid Configuration Wizard (HCW) é necessário ajustar o Receive-Connector com o comando PowerShell abaixo:</p> <p><strong>Set-ReceiveConnector -Identity &lt;Name of Internet-facing connector&gt; -TlsDomainCapabilities mail.protection.outlook.com:AcceptOorgProtocol -Fqdn</strong>  <p>-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-</p> <p>Atualizado em 13/01/2016 – Inclusão do item 5 – Instalação dos certificados</p> <p>Atualizado em 14/01/2016 – inclusão da nota sobre não reescrever o certificado default do SMTP e inclusão do item 11 – Ajustes no receive-connector após a execução do HCW (Hybrid Configuration Wizard).&nbsp; * Contribuição do PFE <strong><u>Vanderson Vicentin.</u></strong></p></p></p></p>]]></content:encoded>
    </item>
    <item>
      <title>Como resolver alguns problemas comuns de sincronização no Azure AD Connect</title>
      <link>https://docs.microsoft.com/archive/blogs/mhunecke/como-resolver-alguns-problemas-comuns-de-sincronizao-no-azure-ad-connect</link>
      <pubDate>Mon, 30 Nov 2015 18:31:40 GMT</pubDate>
      <dc:creator><![CDATA[Marcelo Hunecke]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mhunecke/2015/11/30/como-resolver-alguns-problemas-comuns-de-sincronizao-no-azure-ad-connect/</guid>
      <description><![CDATA[Estou fazendo a revisão de um ambiente Office 365 de um cliente Microsoft e me deparei com alguns...]]></description>
      <content:encoded><![CDATA[<p>Estou fazendo a revisão de um ambiente Office 365 de um cliente Microsoft e me deparei com alguns erros bastante comuns no Azure AD Connect, que não tinha sido investigado mais a fundo.</p> <p><strong>1) Erro de sync de algum objeto com valor inválido em algum atributo.</strong></p> <p>Algumas aplicações (ex. SAP e Squid) precisam alterar o UPN do seu usuário de serviço para um formato não aceito pelo Office 365. Nos casos que já peguei o formato do UPN é algo como: <a href="mailto:&ldquo;host/username@dom&iacute;nio.com.br">“host/username@domínio.com.br</a>”. Como este formato não é aceito no Azure AD a cada sincronização um novo erro é gerado, como abaixo:</p> <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/69/40/metablogapi/image_6DE4AC4D.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-69-40-metablogapi/image_5F00_6DE4AC4D.png"><img title="image" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/69/40/metablogapi/image_thumb_5D00085D.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-69-40-metablogapi/image_5F00_thumb_5F00_5D00085D.png" width="601" height="32" /></a></p> <p>Como este tipo de objeto não precisa ser sincronizado com Office 365, a recomendação é criar um filtro de objeto no Azure AD Connect.</p> <p>No DirSync era fácil de fazer, bastava criar um novo filtro no Management Agent (MA) na opção “Configure Connector Filter”, porém essa opção não está mais disponível no MA da Azure AD Connect. Portanto para criar um filtro de um objeto no Azure AD Connect use os passos abaixo:</p> <p>a) Abra o Synchonization Rules Editor a partir do botão Windows</p> <p>b) Clique em Add New Rule e crie um nova regra, conforme abaixo:</p> <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/69/40/metablogapi/image_15AD431C.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-69-40-metablogapi/image_5F00_15AD431C.png"><img title="image" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/69/40/metablogapi/image_thumb_3E4BAF23.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-69-40-metablogapi/image_5F00_thumb_5F00_3E4BAF23.png" width="396" height="177" /></a></p> <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/69/40/metablogapi/image_44D9089C.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-69-40-metablogapi/image_5F00_44D9089C.png"><img title="image" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/69/40/metablogapi/image_thumb_18BE9C5C.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-69-40-metablogapi/image_5F00_thumb_5F00_18BE9C5C.png" width="552" height="148" /></a></p> <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/69/40/metablogapi/clip_image002_3A660CA6.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-69-40-metablogapi/clip_5F00_image002_5F00_3A660CA6.png"><img title="clip_image002" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="clip_image002" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/69/40/metablogapi/clip_image002_thumb_055C0E27.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-69-40-metablogapi/clip_5F00_image002_5F00_thumb_5F00_055C0E27.png" width="399" height="91" /></a>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/69/40/metablogapi/image_40F0D56E.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-69-40-metablogapi/image_5F00_40F0D56E.png"><img title="image" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/69/40/metablogapi/image_thumb_4DED4630.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-69-40-metablogapi/image_5F00_thumb_5F00_4DED4630.png" width="576" height="106" /></a>  <p>Obs.: O atributo <strong>cloudFiltered </strong>deve ser definido igual a <strong>True</strong>  <p>Ao final clique no botão <strong>Add</strong> para adicionar a o filtro.</p> <p>Voltando a <strong>Synchronization Service Manager</strong> rode um Full Import &amp; Full Synchronization do MA que foi modificado.</p> <p>Esse fitro faz com o que o usuário cujo Display name é igual a “SquidGuard” não seja sincronizado com Office 365 e automaticamente não dê mais erro na sincronização.</p> <p><strong>2) Warning export-change-not-reimported</strong></p> <p>Durante a sincronização Delta Import do Azure AD aparece a mensagem (warnings) abaixo para alguns grupos:</p> <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/69/40/metablogapi/image_041C96AA.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-69-40-metablogapi/image_5F00_041C96AA.png"><img title="image" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/69/40/metablogapi/image_thumb_0829752D.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-69-40-metablogapi/image_5F00_thumb_5F00_0829752D.png" width="382" height="91" /></a>&nbsp;</p> <p>Verificando os grupos percebi que todos estes grupos tinham como membros alguma conta de computador que é Domain Controller (HUNECKE-AD01 ou HUNECKE-AD02), e como as contas de DCs não são sincrinizados com Office 365, é foi necessário criar um filtro para excluir essas contas de computador, conforme abaixo:</p> <p>a) Abra o Synchonization Rules Editor a partir do botão Windows</p> <p>b) Clique em Add New Rule e crie uma nova regra, conforme abaixo:</p> <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/69/40/metablogapi/image_175FDDFA.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-69-40-metablogapi/image_5F00_175FDDFA.png"><img title="image" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/69/40/metablogapi/image_thumb_4B2A64FC.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-69-40-metablogapi/image_5F00_thumb_5F00_4B2A64FC.png" width="405" height="143" /></a></p> <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/69/40/metablogapi/image_4B471B30.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-69-40-metablogapi/image_5F00_4B471B30.png"><img title="image" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/69/40/metablogapi/image_thumb_3658296E.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-69-40-metablogapi/image_5F00_thumb_5F00_3658296E.png" width="547" height="221" /></a></p> <p>Se você criar condições no mesmo grupo, todas as regras deverão ser Verdadeiras<br />Para excluir 2 ou mais contas de computador, é necessário criar um grupo para cada conta de computador.</p> <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/69/40/metablogapi/clip_image002_7BE28E09.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-69-40-metablogapi/clip_5F00_image002_5F00_7BE28E09.png"><img title="clip_image002" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;margin:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="clip_image002" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/69/40/metablogapi/clip_image002_thumb_7B0CB8D0.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-69-40-metablogapi/clip_5F00_image002_5F00_thumb_5F00_7B0CB8D0.png" width="399" height="91" /></a> </p> <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/69/40/metablogapi/image_4CADCEB3.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-69-40-metablogapi/image_5F00_4CADCEB3.png"><img title="image" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/69/40/metablogapi/image_thumb_3518B1F1.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-69-40-metablogapi/image_5F00_thumb_5F00_3518B1F1.png" width="572" height="105" /></a> </p> <p>Obs.: O atributo <strong>cloudFiltered </strong>deve ser definido igual a <strong>True</strong></p> <p><strong>3) Required attribute cloudanchor is missing</strong></p> <p>Durante a sincronização Export do Azure AD aparece a mensagem abaixo para algum usuário:</p> <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/69/40/metablogapi/image_417577E6.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-69-40-metablogapi/image_5F00_417577E6.png"><img title="image" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/69/40/metablogapi/image_thumb_722DA0F3.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-69-40-metablogapi/image_5F00_thumb_5F00_722DA0F3.png" width="581" height="28" /></a></p> <p>Abrindo os detalhes do erro chegamos à mensagem: </p> <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/69/40/metablogapi/image_513CBEFD.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-69-40-metablogapi/image_5F00_513CBEFD.png"><img title="image" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/69/40/metablogapi/image_thumb_6D72293D.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-69-40-metablogapi/image_5F00_thumb_5F00_6D72293D.png" width="306" height="104" /></a></p> <p>Essa mensagem geralmente aparece para usuários recém excluídos no Office 365 Portal ou PowerShell e no Office 365 o usuário ainda está na lixeira Recycle Bin). Para resolver exclua o usuário e depois exclua da lixeira usando os seguintes comandos PowerShell:</p> <p><font face="Courier New">Remove-MsolUser -UserPrincipalName </font><a href="mailto:user@yourdomain.com"><font face="Courier New">user@yourdomain.com</font></a><br /><font face="Courier New">Remove-MsolUser -UserPrincipalName </font><a href="mailto:user@yourdomain.com"><font face="Courier New">user@yourdomain.com</font></a><font face="Courier New"> –RemoveFromRecycleBin </font></p> <p>Após a nova sincronização a conta do usuário será criada novamente no Office 365. </p> <p>Rode um Full Sync através do comando: <strong>C:\Program Files\Microsoft Azure AD Sync\Bin\</strong><strong>DirectorySyncClientCmd.exe initial</strong>  <p><strong>4) Stopped-server-down</strong>  <p>Durante a sincronização Export do Azure AD aparece a mensagem abaixo:  <p><u>Stopped-server-down message</u>  <p>Um das causas deste erro pode ser a restrição de execução de usuário em massa, ou seja, o comando <code>Enable-ADSyncExportDeletionThreshold</code>. foi executado.  <p>Para resolver, é necessário desativar essa prevenção usando o comando: <code>Disable-ADSyncExportDeletionThreshold,<font face="Segoe UI">e rodar novamente o Export do MA do Azure AD.</font></code>  <p>&nbsp;</p> <p>Depois destes ajustes, com filtros por usuário e por conta de computador, o Azure AD Connect está sincronizado 100%, sem qualquer erro ou mesmo warning, como abaixo:</p> <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/69/40/metablogapi/image_6C672E4D.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-69-40-metablogapi/image_5F00_6C672E4D.png"><img title="image" style="border-left-width:0px;border-right-width:0px;background-image:none;border-bottom-width:0px;padding-top:0px;padding-left:0px;display:inline;padding-right:0px;border-top-width:0px;" border="0" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/69/40/metablogapi/image_thumb_77934948.png" original-url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-69-40-metablogapi/image_5F00_thumb_5F00_77934948.png" width="471" height="95" /></a></p> <p>Source: <a title="https://msdn.microsoft.com/en-us/library/azure/dn801051.aspx" href="https://msdn.microsoft.com/en-us/library/azure/dn801051.aspx">https://msdn.microsoft.com/en-us/library/azure/dn801051.aspx</a></p></p></p></p></p></p></p></p></p></p>]]></content:encoded>
    </item>
    <item>
      <title>Bypass da autenticação MFA para Outlook com Exchange Online (Office 365)</title>
      <link>https://docs.microsoft.com/archive/blogs/mhunecke/bypass-da-autenticao-mfa-para-outlook-com-exchange-online-office-365</link>
      <pubDate>Mon, 27 Jul 2015 16:13:28 GMT</pubDate>
      <dc:creator><![CDATA[Marcelo Hunecke]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mhunecke/2015/07/27/bypass-da-autenticao-mfa-para-outlook-com-exchange-online-office-365/</guid>
      <description><![CDATA[Recentemente participei da implementação de uma solução MFA (Multi-Factor Authentication) de...]]></description>
      <content:encoded><![CDATA[<p>Recentemente participei da implementação de uma solução MFA (Multi-Factor Authentication) de terceiro com Office 365, no caso Symantec VIP Service, mas o artigo pode ser utilizado para qualquer provedor de MFA, inclusive da Microsoft.  <p>O principal desafio destas soluções de MFA é tratar as conexões do Outlook Client e da Lync client com o Office 365, pois estas aplicações não utilizar SAML padrão para fazer a autenticação, logo, quando habilitado MFA, os usuários dessas aplicações não conseguem se autenticar e ficam repetidamente solicitando as credencias do usuário.  <p>Algumas alternativas:  <p>1) Habilitar MFA apenas para acesso externo e liberar apenas o OWA (Outlook Web App), mas limitaria significativamente a experiência dos usuários, logo não atende.  <p>2) Habilitar MFA apenas para acesso externo e forçar que o acesso seja sempre feito via VPN, na maioria dos casos também não atende, pois perde-se o conceito de “nuvem” (acesso de qualquer lugar, qualquer devices).  <p>Mesmo que qualquer uma destas soluções acima atendesse a necessidade de negócio, tem um problema adicional. O Outlook client dentro da rede corporativa tenta fazer a autenticação externamente (passando pelo Web Application Proxy também conhecido como ADFS Proxy).  <p>Para resolver isso, é necessário criar uma condição adicional de uso do MFA.  <p>Quando o MFA é ativado para acesso externo uma regra adicional de autenticação é criada, que valida se a solicitação de autenticação está vindo da rede corporativa ou da rede externa. Se a condição for verdadeira aplica a regra, ou seja, exige MFA.  <p>Intranet = solicitação direto no ADFS  <p>Extranet = solicitação encaminhada via Web Proxy Application  <p><i>c:[Type == &quot;http://schemas.microsoft.com/ws/2012/01/insidecorporatenetwork&quot;, Value == &quot;false&quot;] =&gt; issue(Type = &quot;http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationmethod&quot;, Value = &quot;http://schemas.microsoft.com/claims/multipleauthn&quot;);</i>  <p>Em resumo: essa regra foça autenticação MFA para todas as aplicações (Portal, Outlook, Lync) quando vindo de fora da rede corporativa, o que faz o Outlook e Lync pararem de funcionar externamente o Outlook internamente.  <p>Para solicitar isso, é necessário adicionar uma nova condição na regra acima, controlando qual tipo de cliente que está requisitando a autenticação. Se for requisição web, solicita MFA, se for aplicação Outlook ou Lync não pede MFA.  <p>A condição mais fácil de ser aplicada é a que valida o valor se o valor “x-ms-endpoint-absolute-path” recebida na requisição de autenticação é igual a “/adfs/ls”, isso quer dizer que requisição é vinda de um browser, como por exemplo, acesso ao portal do Office 365 ou mesmo OWA.  <p>Com isso a regra ficaria:  <p><i>c:[Type == &quot;http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-endpoint-absolute-path&quot;, Value =~ &quot;(/adfs/ls)&quot;] =&gt; issue(Type = &quot;http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationmethod&quot;, Value = &quot;http://schemas.microsoft.com/claims/multipleauthn&quot;); c:[Type == &quot;http://schemas.microsoft.com/ws/2012/01/insidecorporatenetwork&quot;, value == &quot;false&quot;] =&gt; issue(Type = &quot;http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationmethod&quot;, Value = &quot;http://schemas.microsoft.com/claims/multipleauthn&quot;);</i>  <p>Explicação dada, vamos à prática, como implementar isso no servidor ADFS:  <p>O ajuste necessário para fazer o “by-pass” do Outlook tanto quando é acessado de dentro e de fora segue abaixo: <p>1) Adicionar as a Claim rules para Active Directory Provider, conforme step2 do artigo <a href="https://technet.microsoft.com/en-us/library/hh526961(v=ws.10).aspx">https://technet.microsoft.com/en-us/library/hh526961(v=ws.10).aspx</a> <p>Além das 5 rules regras já documentadas, incluir também a <a href="http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationmethod">http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationmethod</a> <p>2) Habilitar o MFA para Extranet no console do ADFS, selecionando apenas Extranet; <p>3) Fazer backup do configuração das Relying Party Trust, com o comando: Get-AdfsRelyingPartyTrust (guardar o resultado de saída para uma eventual necessidade de restore); <p>4) Rodar o seguinte comando PowerShell para reconfigurar o Relying Party Trust forçando autenticação MFA apenas para acesso via browser e fazendo by-pass da autenticação quando acesso for por Outlook/Lync, etc.... <p><i></i> <p><i>$rp = Get-AdfsRelyingPartyTrust -Name &quot;Microsoft Office 365 Identity Platform&quot; </i> <p><i>$GroupMfaClaimTriggerRule = &#39;c:[Type == &quot;<a href="http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-endpoint-absolute-path">http://schemas.microsoft.com/2012/01/requestcontext/claims/x-ms-endpoint-absolute-path</a>&quot;, Value =~ &quot;(/adfs/ls)&quot;] &amp;&amp; c1:[Type == &quot;<a href="http://schemas.microsoft.com/ws/2012/01/insidecorporatenetwork">http://schemas.microsoft.com/ws/2012/01/insidecorporatenetwork</a>&quot;, Value == &quot;false&quot;] =&gt; issue(Type = &quot;<a href="http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationmethod">http://schemas.microsoft.com/ws/2008/06/identity/claims/authenticationmethod</a>&quot;, Value = &quot;<a href="http://schemas.microsoft.com/claims/multipleauthn">http://schemas.microsoft.com/claims/multipleauthn</a>&quot;);&#39;</i> <p><i>Set-AdfsRelyingPartyTrust -TargetRelyingParty $rp -AdditionalAuthenticationRules $GroupMfaClaimTriggerRule</i> <p>5) Fazer os testes.</p> <p>&nbsp;</p> <p>(nos próximos dias colocaria alguns Print Screen de referência)</p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p></p>]]></content:encoded>
    </item>
    <item>
      <title>Como gerar um request (CSR) para certificado com algoritmo SHA2 (ou SHA256) para Lync Edge Server</title>
      <link>https://docs.microsoft.com/archive/blogs/mhunecke/como-gerar-um-request-csr-para-certificado-com-algoritmo-sha2-ou-sha256-para-lync-edge-server</link>
      <pubDate>Thu, 02 Apr 2015 12:00:00 GMT</pubDate>
      <dc:creator><![CDATA[Marcelo Hunecke]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mhunecke/2015/04/02/como-gerar-um-request-csr-para-certificado-com-algoritmo-sha2-ou-sha256-para-lync-edge-server/</guid>
      <description><![CDATA[Introdu&ccedil;&atilde;o:
Atualmente as principais entidades certificadoras p&uacute;blicas...]]></description>
      <content:encoded><![CDATA[<p><span style="text-decoration:underline;">Introdu&ccedil;&atilde;o:</span></p>
<p>Atualmente as principais entidades certificadoras p&uacute;blicas est&atilde;o come&ccedil;ando a solicitar certificados com Algoritmo de Assinatura (Signature algorithm) SHA-2, conforme abaixo:</p>
<p><strong>Signature Algorithm:</strong><br /><strong>&nbsp;&nbsp;&nbsp; Algorithm ObjectId: 1.2.840.113549.1.1.11 sha256RSA</strong><br /><strong>&nbsp;&nbsp;&nbsp; Algorithm Parameters:</strong><br /><strong>&nbsp;&nbsp;&nbsp; 05 00</strong></p>
<p>Hoje em dia, os assistentes de cria&ccedil;&atilde;o de request do Exchange, IIS, Certificate Authoriry (via console ou mesmo, via WebSite) ainda n&atilde;o fazem requests com SHA-2, apenas com SHA-1.</p>
<p>Para gerar os request com SHA-2 n&atilde;o &eacute; poss&iacute;vel utilizar o Wizard o Lync Server e sim, &eacute; necess&aacute;rio utilizar uma ferramenta adicional, no meu caso escolhi utilizar OpenSSL que est&aacute; dispon&iacute;vel para download em: <a href="http://slproweb.com/products/Win32OpenSSL.html">http://slproweb.com/products/Win32OpenSSL.html</a> (Escolha a vers&atilde;o 64 bits).</p>
<p><span style="text-decoration:underline;">Passo a passo:</span></p>
<p>1) Em qualquer servidor (preferencialmente em algum servidor Edge), baixe a ferramenta OpenSSL e instale. O caminho default &eacute; <b><i>c:\OpenSSL-Win64\bin\</i></b></p>
<p>2) Para o certificado <b>interno</b> do Edge - Crie um arquivo na pasta onde o OpenSSL foi instalado com o nome <b><i>LyncInternalConfig.cnf </i></b>com o seguinte conte&uacute;do:</p>
<p><span style="font-family:Courier New;">[ req ] <br />distinguished_name = req_distinguished_name <br />req_extensions = v3_req <br />prompt = no <br />[ req_distinguished_name ] <br />C = BR <br />ST = RS <br />L = Porto Alegre <br />O = Hunecke Company <br />OU = TI <br />CN = rtcedge.hunecke.net <br />[ v3_req ] <br /># Extensions to add to a certificate request <br />basicConstraints = critical, CA:FALSE <br />keyUsage = critical, digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment <br />extendedKeyUsage = serverAuth <br />subjectKeyIdentifier=hash <br />subjectAltName = @alt_names <br />[ alt_names ] <br />DNS.1 = rtcedge.hunecke.net <br />DNS.2 = edge01.hunecke.net <br />DNS.3 = edge02.hunecke.net</span></p>
<p>3) Para o certificado <b>externo</b> do Edge - Crie um arquivo na pasta onde o OpenSSL foi instalado com o nome <b><i>LyncExternalConfig.cnf</i></b> com o seguinte conte&uacute;do:</p>
<p><span style="font-family:Courier New;">[ req ] <br />distinguished_name = req_distinguished_name <br />req_extensions = v3_req <br />prompt = no <br />[ req_distinguished_name ] <br />C = BR <br />ST = RS <br />L = Porto Alegre <br />O = Hunecke Company <br />OU = TI <br />CN = sip.hunecke.com.br <br />[ v3_req ] <br /># Extensions to add to a certificate request <br />basicConstraints = critical, CA:FALSE <br />keyUsage = critical, digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment <br />extendedKeyUsage = serverAuth <br />subjectKeyIdentifier=hash <br />subjectAltName = @alt_names <br />[ alt_names ] <br />DNS.1 = sip.hunecke.com.br <br />DNS.2 = webcon.hunecke.com.br <br />DNS.3 = webext.hunecke.com.br <br />DNS.4 = webdirext.hunecke.com.br <br />DNS.5 = meet.hunecke.com.br <br />DNS.6 = dialin.hunecke.com.br <br />DNS.7 = officewebapps01.hunecke.com.br <br />DNS.8 = lyncdiscover.hunecke.com.br</span></p>
<p>4) Para o certificado <b>interno</b> do Edge &ndash; Rode o seguinte comando no Command Prompt:</p>
<p><span style="font-family:Courier New;">cd c:\OpenSSL-Win64\bin</span></p>
<p><span style="font-family:Courier New;">openssl req -nodes -sha256 -newkey rsa:2048 -keyout C:\OpenSSL-Win64\PrivateKey.key -out C:\OpenSSL-win64\bin\ LyncInternalConfig.req -config C:\OpenSSL-Win64\bin\LyncInternalConfig.cnf</span></p>
<p>5) Para o certificado <b>externo</b> do Edge &ndash; Rode o seguinte comando no Command Prompt:</p>
<p><span style="font-family:Courier New;">cd c:\OpenSSL-Win64\bin</span></p>
<p><span style="font-family:Courier New;">openssl req -nodes -sha256 -newkey rsa:2048 -keyout C:\OpenSSL-Win64\PrivateKey.key -out C:\OpenSSL-win64\bin\ LyncExternalConfig.req -config C:\OpenSSL-Win64\bin\LyncExternalConfig.cnf</span></p>
<p>6) Os requests foram gerados na pasta C:\OpenSSL-win64\bin\ com os nomes: <b><i>LyncInternalConfig.cer </i></b>e <b><i>LyncExternalConfig.cer</i></b>. Encaminhe para a entidade certificadora p&uacute;blica.</p>
<p>Em breve, mais detalhes sobre o request SHA-2.</p>]]></content:encoded>
    </item>
    <item>
      <title>Scripts para executar o Disaster Recorver do Lync 2013 (Pool Pairing)</title>
      <link>https://docs.microsoft.com/archive/blogs/mhunecke/scripts-para-executar-o-disaster-recorver-do-lync-2013-pool-pairing</link>
      <pubDate>Wed, 16 Apr 2014 21:49:09 GMT</pubDate>
      <dc:creator><![CDATA[Marcelo Hunecke]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mhunecke/2014/04/16/scripts-para-executar-o-disaster-recorver-do-lync-2013-pool-pairing/</guid>
      <description><![CDATA[Os scripts abaixo podem ser usado para similar um disaster recover do Lync Server 2013 configurado...]]></description>
      <content:encoded><![CDATA[<p>Os scripts abaixo podem ser usado para similar um disaster recover do Lync Server 2013 configurado com Pool Pairing, ou seja, 2 Pools Ativo-Ativo.</p>  <p>Neste cenário o CMS está no pool<em> Lyncsdt01.contoso.com</em> e os usuários estão divididos entre os 2 Pools (<em>Lyncsdt01.contoso.com</em>&#160; e <em>Lyncsdt02.contoso.com</em>).</p>  <p>O script migra o CMS para o pool <em>Lyncsdt02.contoso.com</em>&#160; e ativa todos os usuários do pool <em>Lyncsdt01.contoso.com</em>&#160; no pool <em>Lyncsdt02.contoso.com.. </em></p>  <p><strong>Cenário onde a parade do pool <em>Lyncsdt01.contoso.com</em>&#160; é programada.</strong></p>  <p><font face="Courier New">Start-CsWindowsService -ComputerName LYNCSTD01.contoso.com      <br />Start-CsWindowsService -ComputerName LYNCSTD02.contoso.com       <br />Get-CsBackupServiceStatus -PoolFqdn lyncstd01.contoso.com       <br />Get-CsBackupServiceStatus -PoolFqdn lyncstd02.contoso.com       <br />Invoke-CsManagementServerFailover -BackupSqlInstanceName RTC -BackupSqlServerFqdn lyncSTD02.contoso.com -Force:$False -Confirm:$False       <br />Invoke-CsPoolFailOver -PoolFqdn lyncstd01.contoso.com -DisasterMode:$False -Confirm:$False       <br /></font></p>  <p>O script abaixo volta o CMS para o pool <em>Lyncsdt01.contoso.com</em> e reativa os usuários no pool <em>Lyncsdt01.contoso.com. </em></p>  <p>   <br /><font face="Courier New">Invoke-CsPoolFailBack -PoolFqdn lyncstd01.contoso.com -DisasterMode:$False -Confirm:$False      <br />Invoke-CsManagementServerFailover -BackupSqlInstanceName RTC -BackupSqlServerFqdn lyncSTD01.contoso.com -Force:$False -Confirm:$False       <br />Get-CsBackupServiceStatus -PoolFqdn lyncstd01.contoso.com       <br />Start-CsWindowsService -ComputerName LYNCSTD01.contoso.com       <br />Start-CsWindowsService -ComputerName LYNCSTD02.contoso.com</font></p>  <p><strong>Cenário onde o pool <em>Lyncsdt01.contoso.com</em> ficou indisponível (não programado).</strong></p>  <p>OBS.: a única diferença do script acima é que os parâmetros <u>Force</u> (comando Invoke-CsManagementServerFailover ) e <u>DisasterMode</u> (comando Invoke-CsPoolFailOver) devem ser configurados como True, pois o <em>Lyncsdt01.contoso.com</em>&#160; não está disponível. No script de failback (segunda parte) não há diferença, pois considera-se que na hora de fazer o failback ambos os pools estão disponíveis.</p>  <p><font face="Courier New">Start-CsWindowsService -ComputerName LYNCSTD01.contoso.com      <br />Start-CsWindowsService -ComputerName LYNCSTD02.contoso.com       <br />Get-CsBackupServiceStatus -PoolFqdn lyncstd01.contoso.com       <br />Get-CsBackupServiceStatus -PoolFqdn lyncstd02.contoso.com       <br />Invoke-CsManagementServerFailover -BackupSqlInstanceName RTC -BackupSqlServerFqdn lyncSTD02.contoso.com -Force:$True -Confirm:$False       <br />Invoke-CsPoolFailOver -PoolFqdn lyncstd01.contoso.com -DisasterMode:$True-Confirm:$False       <br /></font>    <br /><font face="Courier New">Invoke-CsPoolFailBack -PoolFqdn lyncstd01.contoso.com -DisasterMode:$False -Confirm:$False      <br />Invoke-CsManagementServerFailover -BackupSqlInstanceName RTC -BackupSqlServerFqdn lyncSTD01.contoso.com -Force:$False -Confirm:$False       <br />Get-CsBackupServiceStatus -PoolFqdn lyncstd01.contoso.com       <br />Start-CsWindowsService -ComputerName LYNCSTD01.contoso.com       <br />Start-CsWindowsService -ComputerName LYNCSTD02.contoso.com</font></p>]]></content:encoded>
    </item>
    <item>
      <title>Como listar o Routing Groups do Lync Server 2103</title>
      <link>https://docs.microsoft.com/archive/blogs/mhunecke/como-listar-o-routing-groups-do-lync-server-2103</link>
      <pubDate>Mon, 14 Apr 2014 17:18:26 GMT</pubDate>
      <dc:creator><![CDATA[Marcelo Hunecke]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/mhunecke/2014/04/14/como-listar-o-routing-groups-do-lync-server-2103/</guid>
      <description><![CDATA[Um das novidades do Lync Server 2013 são os Routing Groups, mais detalhes vocês encontram...]]></description>
      <content:encoded><![CDATA[<p>Um das novidades do Lync Server 2013 são os Routing Groups, mais detalhes vocês encontram em:(<a title="http://blogs.technet.com/b/rischwen/archive/2014/02/24/lync-2013-high-availability-deep-dive-architecture.aspx" href="http://blogs.technet.com/b/rischwen/archive/2014/02/24/lync-2013-high-availability-deep-dive-architecture.aspx">http://blogs.technet.com/b/rischwen/archive/2014/02/24/lync-2013-high-availability-deep-dive-architecture.aspx</a>).</p>  <p>Atualmente, não existem cmdlets que mostram detalhes dos Routing Groups, nem mesmo listam eles. Pois isso, consolidei o conteúdo de várias fontes e gerei um script PowerShell que conecta no SQL Server e apresenta a lista dos Routing Groups, nome do servidor Front End e usuários associados ao Routing Group.</p>  <p>Para rodar o script abaixo, basta modificar a primeira linha do script ($SqlServer = ), usando o format “FrondEndServer\SQLInstance”.</p>  <p><font face="Courier New"></font></p>  <p><font face="Courier New">#***** Inicio do script ******* </font></p>  <p><font face="Courier New">$SqlServer = &quot;lyncent01\rtclocal&quot;      <br />$SqlDatabase = &quot;rtc&quot;       <br /></font><font face="Courier New">&#160;&#160;&#160;&#160; <br /></font><font face="Courier New">$SqlQuery = &quot;Select RoutingGroupAssignment.RoutingGroupName, FrontEnd.Fqdn, Resource.UserAtHost from [rtc].[dbo].ResourceDirectory      <br />INNER JOIN [rtc].[dbo].Resource       <br />ON ResourceDirectory.ResourceId=Resource.ResourceId       <br />INNER JOIN [rtc].[dbo].RoutingGroupAssignment       <br />ON ResourceDirectory.RoutingGroupId=RoutingGroupAssignment.RoutingGroupId       <br />INNER JOIN [rtc].[dbo].FrontEnd       <br />ON RoutingGroupAssignment.FrontEndId=FrontEnd.FrontEndId       <br />ORDER BY [rtc].[dbo].RoutingGroupAssignment.RoutingGroupId&quot; </font></p> <font face="Courier New"></font>  <p><font face="Courier New">$SqlConnection = New-Object System.Data.SqlClient.SqlConnection      <br />$SqlConnection.ConnectionString = &quot;Server = $SqlServer; Database =       <br />$SqlDatabase; Integrated Security = True&quot;       <br />$SqlCmd = New-Object System.Data.SqlClient.SqlCommand       <br />$SqlCmd.CommandText = $SqlQuery       <br />$SqlCmd.Connection = $SqlConnection       <br />$SqlAdapter = New-Object System.Data.SqlClient.SqlDataAdapter       <br />$SqlAdapter.SelectCommand = $SqlCmd       <br />$DataSet = New-Object System.Data.DataSet       <br />$SqlAdapter.Fill($DataSet)       <br />$SqlConnection.Close()       <br />Clear       <br />#output the data       <br />$DataSet.Tables[0]</font> </p>  <p><font face="Courier New">#***** Final do script ******* </font></p>  <p>O resultado esperado é algo como: </p>  <p>   <br /><font face="Courier New">RoutingGroupName&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Fqdn&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; UserAtHost      <br />----------------&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ----&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ----------       <br />fd09e63c-8643-5799-bd0c-9bd54af88858&#160; LYNCENT03.contoso.com&#160;&#160; RtcApplication-3dd1..       <br />fd09e63c-8643-5799-bd0c-9bd54af88858&#160; LYNCENT03.contoso.com&#160;&#160; GC-1-PersistentChat..       <br />fd09e63c-8643-5799-bd0c-9bd54af88858&#160; LYNCENT03.contoso.com&#160;&#160; Yan@contoso.com       <br />cc509a2a-6ebc-50e2-9ee1-140cf72076bb&#160; LYNCENT01.contoso.com&#160;&#160; Jeff@contoso.com       <br />406f2b07-bb5b-563c-a588-ae387660b98b&#160; LYNCENT01.contoso.com&#160;&#160; Jim@contoso.com       <br />a83fca89-c2a8-56fb-9a38-9f8ec8e2a983&#160; LYNCENT03.contoso.com&#160;&#160; Jon@contoso.com       <br />255e1329-a560-52b2-98d3-67c49ec81d38&#160; LYNCENT02.contoso.com&#160;&#160; Mike@contoso.com       <br />94a40ddd-e63d-50b7-a8b8-b8733245053b&#160; LYNCENT02.contoso.com&#160;&#160; Nate@contoso.com       <br />5ea41329-5003-560a-bd08-90f2cfa2560e&#160; LYNCENT02.contoso.com&#160;&#160; Toby@contoso.com</font></p>  <p>Ref.: <a title="http://blogs.technet.com/b/rischwen/rss.aspx" href="http://blogs.technet.com/b/rischwen/rss.aspx">http://blogs.technet.com/b/rischwen/rss.aspx</a></p>]]></content:encoded>
    </item>
  </channel>
</rss>