Step by Step Directions for Techs

Monthly Archives: February 2013

Exchange 2013 stops receiving mail. It was working…

A newly installed Exchange 2013 server was receiving mail and now it is not receiving mail.  No changes to the connectors and a reboot seems to fix the problem.  There seems to be some debate as to whether or not it is a bug related to the mail filter and / or the receive connectors fighting over port 25.  Either way, we can’t have it.

Two things should put a stop to this.

  1. Disable filter through Exchange Management Shell

    Set-MalwareFilteringServer -BypassFiltering $true

  2. Schedule a restart of the Exchange transport service every 2 hours.  I use a PowerShell script for this that (create a PS1 file).

    try { net stop MSExchangeTransport }
    catch { }
    finally {
    Start-Sleep -s 60
    net start MSExchangeTransport

When you schedule the task:

  1. Run on startup
  2. Set to run every hour with 15 minute delay
  3. Run with highest privileges
  4. Command to run is “powershell” with the path to the PS1 script (I store mine in “C:\Scripts”)

Make sure you test it!  Hopefully you will continue to receive mail until there is a more permanent fix.

AVDH with my VDH? I don’t have any snapshots!

While you may think that if you merged your Hyper-V snapshots, you shouldn’t have AVHD files with your VHD files.  For the record, the AVHD files are snapshot files used by Hyper-V to store the changes to the VHD without committing them.

Provided you checked SCVMM (System Center Virtual Machine Manager) or the Hyper-V console and saw no snapshots associated with the VM, the AVHD is a hold over from a previous snapshot.  But wait!  Don’t delete it.

If you checked the file dates, you will see that the AVHD file is still actively being written to and the VHD file is still frozen.  To fix this, shut down the host and wait.  You will see it start merging the files together and it will remove the AVHD when it is fun.  I understand that this may also work if you save the state.

While it isn’t convenient, you can win back quite a bit of space!  Happy merging!

Migrating file server shares with permissions intact

When you are copying files from one server to another or one volume to another and need to retain the file permissions, robocopy is your guy.  In order to speed things up, I will frequently start multiple windows.  To do this, I will put together multiple lines into a single powershell script that opens multiple windows for me.  Call me lazy, but it works.

cmd.exe /c start cmd /k “ROBOCOPY \\ohsfsdc1\g$\Share1 D:\Share1 /MIR /SEC”
cmd.exe /c start cmd /k “ROBOCOPY \\ohsfsdc1\g$\Share2 D:\Share2 /MIR /SEC”
… and so on

Couple things about this:

  • I usually run it from the destination server (where I am copying things to).
  • You can use this to stage the files, and then rerun it later to grab the stragglers.
  • I don’t believe that it deletes files from the destination that were deleted at the source.
  • This only copies the folder level permissions.  If they have file level permissions (which they shouldn’t because they are evil), there is another robocopy command that you can run that will copy those individual permissions after the main copy has finished.

Exchange mailbox migrations moving at the speed of… well… not fast.

Migrating between Exchange 2007 and 2013 or Exchange 2010 and 2013?  Mailbox migration speeds can be unbearably slow.

Exchange 2013 (as well as older versions, including 2010) changed the number of concurrent mailbox moves to 2…  let’s change that to 5.  Beware of setting it too high as it could have a serious impact on the Exchange infrastructure.

  1. Pause migration jobs
  2. Open Notepad as an Administrator.
  3. Open Microsoft\Exchange Server\V15\Bin\MsExchangeMailboxReplication.exe.config
  4. Find “MaxActiveMovesPerTargetMDB
    Note, the setting appears twice.  The first time it is commented out with <!–  and –>.  Make sure you get the right setting!!!
  5. Change value from 2 to 5
  6. Save the config file
  7. Restart Microsoft Exchange Replication service (MSExchangeRepl)

This change has to be done on all the front end servers.  You should see that it will now migrate 5 mailboxes simultaneously.   You can also speed things up by migrating to multiple data stores simultaneously.  Some caution is needed when trying to max your migration speed as you can pretty easily overrun the storage (especially if it is local).

Good luck!