<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Exchange on Apuntes de root</title>
    <link>https://blog.099c.org/tags/exchange/</link>
    <description>Recent content in Exchange on Apuntes de root</description>
    <generator>Hugo</generator>
    <language>en-US</language>
    <managingEditor>jorti@pm.me (Juan Orti Alcaine)</managingEditor>
    <webMaster>jorti@pm.me (Juan Orti Alcaine)</webMaster>
    <lastBuildDate>Sun, 30 Mar 2014 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://blog.099c.org/tags/exchange/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Export Exchange recipients to Postfix server</title>
      <link>https://blog.099c.org/posts/export-exchange-recipients-to-postfix-server/</link>
      <pubDate>Sun, 30 Mar 2014 00:00:00 +0000</pubDate><author>jorti@pm.me (Juan Orti Alcaine)</author>
      <guid>https://blog.099c.org/posts/export-exchange-recipients-to-postfix-server/</guid>
      <description>&lt;p&gt;When  you have an Exchange server in your organization and you also use a Postfix server as gateway, you need the list of all valid recipients of your organization at your gateway. In this way, you can reject invalid emails at the gateway, and what&amp;rsquo;s more important, when the sender address is forged, you don&amp;rsquo;t spam innocent people with undeliverable emails.&lt;/p&gt;&#xA;&lt;p&gt;I use this script in Exchange 2003 to generate all addresses.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Eliminar buzones de usuarios deshabilitados en Exchange 2010</title>
      <link>https://blog.099c.org/posts/eliminar-buzones-de-usuarios-deshabilitados-en-exchange-2010/</link>
      <pubDate>Fri, 28 Oct 2011 00:00:00 +0000</pubDate><author>jorti@pm.me (Juan Orti Alcaine)</author>
      <guid>https://blog.099c.org/posts/eliminar-buzones-de-usuarios-deshabilitados-en-exchange-2010/</guid>
      <description>&lt;p&gt;Aquí os pongo un script que borra los buzones de Exchange de los usuarios deshabilitados en AD. Comprueba que sean del tipo UserMailbox, porque hay buzones como los RoomMailbox cuyo usuario está deshabilitado, cuidado con esto.&lt;/p&gt;&#xA;&lt;p&gt;Es necesario tener instalado los &lt;a href=&#34;http://www.quest.com/powershell/activeroles-server.aspx&#34; title=&#34;Quest Powershell commands for Active Directory&#34;&gt;comandos powershell para Active Directory de Quest&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;# Script que deshabilita los buzones de todos los usuarios de AD deshabilitados&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Add-PSSnapin Quest.ActiveRoles.ADManagement -ErrorAction SilentlyContinue | Out-Null&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010 -ErrorAction SilentlyContinue | Out-Null&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$DisabledMailboxes = New-Object -TypeName Microsoft.Exchange.Data.Directory.Management.Mailbox&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;$DisabledMailboxes = $null&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Get-QADUser -Disabled -SizeLimit 0 | foreach-object {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   $ID = $_.samaccountname&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   $mbx = Get-Mailbox -Identity $ID -RecipientTypeDetails UserMailbox  -ErrorAction SilentlyContinue&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   If ($mbx) {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      Write-Host &amp;#34;Añado a la lista: &amp;#34; $mbx.Name&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      $DisabledMailboxes += $mbx&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;If ($DisabledMailboxes) {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   $DisabledMailboxes | foreach-object {&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      Write-Host &amp;#34;Deshabilito el buzón: &amp;#34; $_.Name&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;      $_ | Disable-Mailbox -Confirm:$false&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;   }&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;}&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Get-MailboxDatabase | Clean-MailboxDatabase&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
  </channel>
</rss>
