John Yassa's Blog

Home » Exchange 2007

Category Archives: Exchange 2007

HOW TO RESTORE THE EXCHANGE DATABASE FROM A BACKUP FILE IN STATE OF INCONSISTENCY?

How to Restore the Exchange Database from A Backup File in state of inconsistency?

For restoring the database on Exchange Server, the user needs to have an up-to-date and usable backup in hand, because an incomplete or even no backup can create a troublesome situation during the database the process of restoration. Additionally, Microsoft Information Store needs to be in a healthy state to mount the database successfully.

With an unmounted Exchange Store, the users face several issues such as restricted access to the data and the mail flow. In order to smoothly restore your database on Exchange Server, it is important to perform certain tests to verify the database consistency.

Pre-assessment Phase: Verify the State of the Database on Exchange

Use the following steps to verify the state of the database:

  1. Launch a command prompt.
  2. Move to the Drive:\Program Files\Exchsrvr\Bin

(The default location of the of Exchange 2000 Server program files are located in this folder)

 

Move to Drive:\Program Files\Microsoft\Exchange Server\V15\Bin

(When using Exchange 2013/2016, then use the above-mentioned default path)

 

  1. Enter the below-mentioned command:

eseutil /mh “drive:\program files\exchsrvr\mdbdata\database_name.edb”

Note: The default location of database files is on this Drive:\Program Files\Exchsrvr\MDBDATA folder. The public database file can be found with the name: “Public.edb”, whereas the mailbox store database file can be found with the name: “Priv1.edb”.

  1. Read the Output, in order to verify the state of the database. If the database appears in the state of inconsistency, then the output will appear, as:

State: Dirty Shutdown

Restoration Phase: How to Restore the database from a backup file

Upon using the pre-assessment phase, if the database appears in a consistent state, then simply restore the backup using the file.

Steps to Restore Database in A Consistent State:

Implement the following steps to restore the database from the backup file.

  1. Transfer the E00.log file to an another path or simply rename it.

The default location of E00.log file can be found on this Drive:\Program Files\Exchsrvr\MDBDATA folder.

  1. Restore the storage group and the log files from the backup file.

Note: Do not remove the existing log files, until you have performed the restore operation. Upon completing the restore operation, the log files are restored, and replay inside the restored database. This is how, the user can bring the database into a consistent state without involving the E00.log file.

  1. Once the storage group is restored, you can successfully mount the databases in the storage group.

Steps to Restore Database in an Inconsistent State:

  1. Launch the command prompt.
  2. Reach to the location – Drive:\Program Files\Exchsrvr\Bin folder.
  3. Enter the following command in the command prompt:

eseutil /p “drive:\program files\exchsrvr\mdbdata\database_file_name.edb”

  1. To use the database in a productive environment, try to defragment and then rebuild the database. Use the below mentioned command to proceed:

eseutil /d /t:x “drive:\program files\exchsrvr\mdbdata\database_file_name.edb”

Note: ‘x’ is a temporary drive location in the above-mentioned command.

  1. To determine the state of the database, enter the following command, and then read the output:

eseutil /mh “drive:\program files\exchsrvr\mdbdata\database_file_name.edb”

When database is consistent, the output will appear, as:

State: Clean Shutdown

  1. Use the Microsoft’s Store Integrity utility (Isinteg.exe) to fix the logical corruption issues in the database. Use the following commands to repair it:

Isinteg –s exchange_server_name –fix –test alltests

After executing the command, the user is prompted to choose the database in the utility. Repeat the aforementioned command until no errors or fixes are appeared in the output.

However, if zero errors are not displayed for a database that  you want to repair, then the other option is to rebuild the database. To do that create a new mailbox store on either the existing Exchange server or new server and then transfer all the mailboxes to that one. However, if you are still unable to create a new mailbox store, then try to rebuild the database from the following method. To do it, try to export all mailbox information to PST files, and delete the database, and finally import the data.

  1. Repeat the steps from 3 to 6 for each database in the storage group.
  2. Mount the databases.

Once the database is restored and you can also perform an online backup of the storage group. However, if the database is not restored or rebuilt in the state of inconsistency, then try using a third-party Exchange recovery software like Kernel for Exchange Server to perform accurate recovery of lost information from corrupt EDB and STM files, and without requiring log files. The Exchange mailbox items can be successfully restored to live Exchange Server, Office 365 mailbox or to Outlook PST files.

https://www.kerneldatarecovery.com/exchange-server-recovery.html

Article Summary:

When Exchange database creates mounting troubles, then try to investigate the issues hampering the restore operation. Verifying the shutdown state (whether consistent or inconsistent) of the database becomes important, and Eseutil can be helpful in this scenario, but with certain restrictions.

Understand and Control AutoDiscover methods for Outlook

Did you ever ask yourself how Outlook connects to your servers

Outlook uses AutoDiscover service to connect to Exchange online or you on premise Exchange

In some scenarios, you may want to control the methods that are used by Outlook to find the AutoDiscover service. This depends on the client/server topology, but these are the methods that are used by Outlook:

SCP lookup
HTTPS root domain query
HTTPS AutoDiscover domain query
HTTP redirect method
SRV record query

By default, Outlook uses one or more of these methods to reach the AutoDiscover service. For example, for a computer that is not joined to a domain, Outlook tries to connect to the predefined URLs (for example, https://autodiscover.contoso.com/autodiscover/autodiscover.xml) by using DNS. If that fails, Outlook tries the HTTP redirect method. If that does not work, Outlook tries to use the SRV record lookup method. If all lookup methods fail, Outlook cannot obtain “Outlook Anywhere” configuration and URL settings.

 

Lets understand the 5 methods that outlook uses:

SCP lookup
Outlook performs an Active Directory query for Service Connection Point (SCP) objects.

Root domain query 
Outlook uses the root domain of your primary SMTP address to try to locate the AutoDiscover service. Outlook tries to connect to the following URL based on your SMTP address: https://<smtp-address-domain>/autodiscover/autodiscover.xml

AutoDiscover domain Query
Outlook uses the AutoDiscover domain to try to locate the AutoDiscover service. Outlook tries to connect to the following URL based on your SMTP address: https://autodiscover.<smtp-address-domain>/autodiscover/autodiscover.xml
HTTP redirect
Outlook uses HTTP redirection if Outlook cannot reach the AutoDiscover service through either of the secure HTTPS URLS:
https://<smtp-address-domain>/autodiscover/autodiscover.xml
https://autodiscover.<smtp-address-domain>/autodiscover/autodiscover.xml

SRV record query
Outlook uses an SRV record lookup in DNS to try to locate the AutoDiscover service.

 

Now how can you control these methods

You can do this and enable/disable these methods for outlook through registry keys

Outlook 2010 :
HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\AutoDiscover

Outlook 2013 :
HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Outlook\AutoDiscover

Outlook 2016:
HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\AutoDiscover

You can change the various options from the registry file as well. They are:

“ExcludeScpLookup”=dword:00000001
“ExcludeHttpsRootDomain”=dword:00000000
“ExcludeHttpsAutoDiscoverDomain”=dword:00000000
“ExcludeHttpRedirect”=dword:00000000
“ExcludeSrvRecord”=dword:00000000

Above the SCP lookup is disabled.

 

Source : Support Article , DISABLE AUTODISCOVER METHODS IN OUTLOOK 2013

 

 

 

Released: Update Rollup 14 for Exchange Server 2007 Service Pack 3

The Exchange team is announcing today the availability of Update Rollup 14 for Exchange Server 2007 Service Pack 3. This latest rollup supports recent DST updates. The rollup contains all previously released security bulletins and fixes and updates for Exchange Server 2007 Service Pack 3 as well. This is not a security release, but customers are encouraged to deploy these updates to their environment once proper validation has been completed.

More information on this rollup is available in KB2936861.

Download : Update Rollup 14 for Exchange Server 2007

Remove the latest Public Folder Database from an Organization

To remove the last public folder database from an organization, perform the following steps:

1- Verify that there is no OAB are configured for Public folder distribution as below

OAB

 

2- Remove all Public Folders from Public Folder Database as below

a- Use Power shell to delete user public folders

Get-PublicFolder -Server <server containing the public folder database> “\” -Recurse -ResultSize:Unlimited | Remove-PublicFolder -Server <server containing the public folder database> -Recurse -ErrorAction:SilentlyContinue

b- Use Power shell to delete System Public Folders

Get-PublicFolder -Server <server containing the public folder database> “\Non_Ipm_Subtree” -Recurse -ResultSize:Unlimited | Remove-PublicFolder -Server <server containing the public folder database> -Recurse -ErrorAction:SilentlyContinue


3- Remove the Last Public Folder Database using Power shell

a- Remove-PublicFolderDatabase -Identity “PFDB01”

b- A message appears asking you to confirm that you want to perform this action. Enter Y

c- A warning appears, indicating that the database was removed and reminding you to manually remove the database file. The default location for these files is <Exchange installation path\v14\Mailbox\<public folder database name>.

4- Delete the Public folder Database files manually

When you remove a public folder database, the Exchange database (.edb) file for the database and other files associated with the database aren’t automatically deleted. You must delete the public folder database files manually. The default location for these files on an Exchange 2010 server is <Exchange installation path>\v14\Mailbox\<public folder database name>. The default location for these files on an Exchange 2007 server is C:\Program Files\Microsoft\ExchangeServer\Mailbox\<storage group name>\<public folder database name>.

550 5.7.1 RESOLVER.RST.AuthRequired; authentication required

When you Send to DL in Exchange 2007 or Exchange 2010 , you recieve the error 550 5.7.1 RESOLVER.RST.AuthRequired; authentication required

Reason:
By default Exchange 2007 or Exchange 2010 requires that a sender be authenticated before being able to successfully send to a distribution list. Consequently external users are unable to send emails to it.

Solution:
1- From the properties of the distribution list in Exchange AD: Exchange General tab, Un-tick From authenticated users only
2- From the properties of the distribution list in Exchange Management Console: Mail-flow settings tab, Message Delivery Restrictions, un-tick Require that all senders are authenticated.

 

An old password still works after you change it in Outlook Web Access

Assume that a user changes their password in Outlook Web Access (OWA) in one of the following versions of Microsoft Exchange Server:

  • Microsoft Exchange Server 2010
  • Microsoft Exchange Server 2007
  • Microsoft Exchange Server 2003

In this case, you may notice a 15-minute period during which the user can log on to their mailbox by using either the old password or the new password. However, if the user uses a MAPI client (such as Microsoft Outlook) to access the mailbox or if the user tries to access other files and resources, the user is authenticated only if they use the new password.

This latency exists by design for Internet Information Services (IIS) performance reasons and is controlled by the following registry setting.
Warning   If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

  1. Start Registry Editor (Regedt32.exe) on the server that is running IIS and through which the user gains access to OWA.
  2. Locate the following key in the registry:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\InetInfo\Parameters
  3. On the Edit menu, click Add Value, and then add the following registry value:
    Value Name:  UserTokenTTL   (Note This is case-sensitive!) Data Type:   REG_DWORD Value Range: 0 – 0x7FFFFFFF (Note This unit is in seconds.)
  4. Exit Registry Editor, and then restart IIS.

create bulk of mailboxes in exchange 2010 / 2007

-If you need to craete a bulk of users in exchange 2010/2007 , you will have to use the EMS

-The followin command will allow you to enter a password that will be common for all next created users
$Password=Read-Host “Enter Password” -AsSecureString

-Create a CSV file with the below header containning the requires infor for each user
Name,DisplayName,FirstName,LastName,Alias,UPN,OrganizationalUnit

-Run the below command and give him the path of the created CSV file
Import-Csv “CSV file path”|foreach {new-mailbox -Alias $_.Alias -FirstName $_.FirstName -LastName $_.lastName -UserPrincipalName $_.UPN -name $_.name -DisplayName $_.Displayname -OrganizationalUnit $_.OrganizationalUnit -ResetPasswordOnNextLogon $true -password $password}

-You will find all the users created divided randonly among availiable DB with password you provided in the first command with unlimited Quota

%d bloggers like this: