Tuesday, February 11, 2014

Search query grayed out on in-place hold settings

If you are a domain admin and exchange admin and tried to setup in-place hold setting, you might find the "search query" option is grayed out! You might think "oh no maybe it is the search engine!"
No it is not, you must be a member of "discovery management" group, add your account to be a member of the group, log out form the ECP and log back-in, try to create the in-place hold.

Ok now you done playing with in-place hold and try to delete the in-place hold, and it errors out, and says

Can't remove mailbox search  because there is still at least one mailbox on In-Place Hold.

remove-mailboxsearch will give you the same error, well it has to be disabled first!

Here is a fix:

Set-MailboxSearch   -SourceMailboxes  -InPlaceHoldEnabled $false

If the in-place hold name is "test1" and the last mailbox that are in the in-place hold is "testuser"

Set-MailboxSearch "test1" -SourceMailboxes "testuser" -InPlaceHoldEnabled $false

now remove the in-place hold.


Exchange 2013 disk partition alignment

Visit this page for Exchange 2013 Storage Configuration Options
http://technet.microsoft.com/en-us/library/ee832792(v=exchg.150).aspx


For exchange 2010:
http://exchcluster.blogspot.com/2010/12/disk-partition-alignment-best-practices.html

Monday, February 10, 2014

Trouble shooting exchange 2013 installation problems

1. Errors when you try to install exchange 2013

First,

To fix a problem below, enable IPv6 on the server and DCs, you can disable ipv6 after a successful install.

          if( -not $successfullySetConfigDC)
          {
            Write-ExchangeSetupLog -Error "Unable to set shared config DC.";
          }
        " was run: "Unable to set shared config DC.".

Next..

If you try to install exchange 2013 for the first time and failed, and try again you might see error message below

"Couldn’t attach the data folder 'C:\Program Files\Microsoft\Exchange Server\V15\Bin\Search\Ceres\HostController\Data'. Path doesn’t contain old nodes belonging to the system 'Fsis'."


If you try to install using setup.exe, the setup will tell you to use the server recovery mode, it will still fail.

To fix the problem (warning: If you already have Exchange 2010 or older version, do not follow this instruction!, if you follow this instruction it will remove the current exchange server env. as well)

Open ADSI Edit, select and open "Configuration"

Go down to Services, and delete Microsoft Exchange and Microsoft Exchange Autodiscover

Now open "Default naming context"
Delete  Microsoft Exchange Security Groups and Microsoft Exchange Security Objects

On the server that failed to install exchange 2013

Additional steps:
Delete the C:\Program Files\Microsoft\Exchange Server folder and all the contents

Open IIS
and delete
Exchange Back End and Front End websites (it might be default web site, leave it)

Open AD users and Computers

GO under the users and remove
DiscoverySearch Mailbox*
Exchange Online-ApplicationAccount
FederatedEmail.*
Migration.*
*SystemMailbox*
*HealthMailbox*

Open regedit and delete

HKLM\Software\Microsoft\ExchangeServer
HKLM\CurrentControlSet\Services\MSExchange*


And...

If you successfully install the exchange 2013, you might see...



Exception : Microsoft.Exchange.Management.Deployment.ScriptExecutionException: The following error was generated when "$error.Clear();
.
.
blah blah
.
.
                    {
                        $deleteErrorMsg = "Failure cleaning up SearchFoundation Data folder. - " + $dataFolderPath + " - " + $_.Exception.Message;
                        Write-ExchangeSetupLog -Error $deleteErrorMsg;
                    }
                }
            }
        " was run: "Error occurred while uninstalling Search Foundation for Exchange.System.Exception: Cannot determine the product name registry subkey, neither the 'RegistryProductName' application setting nor the 'CERES_REGISTRY_PRODUCT_NAME' environment variable was set
   at Microsoft.Ceres.Common.Utils.Registry.RegistryUtils.get_ProductKeyName()
   at Microsoft.Ceres.Exchange.PostSetup.DeploymentManager.DeleteDataDirectory()
   at Microsoft.Ceres.Exchange.PostSetup.DeploymentManager.Uninstall(String installDirectory, String logFile)
   at CallSite.Target(Closure , CallSite , Type , Object , Object )".


To fix the error (you might see it again when you apply patches) run this from the powershell

$env:CERES_REGISTRY_PRODUCT_NAME = "Search Foundation for Exchange"



And....

When you try to login to ECP or OWA as domain\administrator you might see

WARNING: the object mydomain/Users/Administrator has been corrupted, and it's in an inconsistent state.


The following validation errors happened:
WARNING: Database is mandatory on UserMailbox.
WARNING: Database is mandatory on UserMailbox.

to fix the problem, re-create the mailbox using disable-mailbox and enable-mailbox command.