Tuesday, November 8, 2011

How to find out which domain controller i'm talking to?

To find out which domain controller your PC is talking to, use the following command:

nltest /dsgetdc:domainname.local



This is very handy when testing your active directory sites and services topology to ensure it is setup correctly. If you want to understand the process in which a client computer locates its domain controller please see this post:

http://clintboessen.blogspot.com/2010/05/how-clients-locate-domain-controllers.html

How to Enable Mailtips In Exchange 2010

If you are not up to speed on Mailtips I suggest you reading this article by the MS Exchange Team:

http://msexchangeteam.com/archive/2009/04/28/451193.aspx

To enable Mail Tips you need to use powershell with the Set-OrganizationConfig cmdlet. There are various components of mailtips you can enable or disable.

- MailTipsAllTipsEnabled. Controls whether MailTips are enabled. The default is $True.

- MailTipsExternalRecipientTipsEnabled. Controls whether MailTips for external recipients are enabled. The default is $False. External recipients are determined by reference to the accepted domains list. Any domain in this list is deemed internal; any other domain is deemed external.

- MailTipsGroupMetricsEnabled. Controls whether MailTips that depend on group sizes are enabled. The default is $True.

- MailTipsLargeAudienceThreshold. Controls the threshold for the number of recipients on a message before MailTips flags it as large. The default value is 25. This value is probably too low for large organizations, where big distribution groups are common. In this scenario, it makes sense to increase the value to 50 to stop MailTips from nagging users for no good reason.

- MailTipsMailboxSourcedTipsEnabled. Controls whether MailTips that depend on mailbox data such as out-of-office notices are enabled. The default is $True

Note: If all are enabled, it will increase load on your client access servers by 5%.

Detach Mailbox from User Account

To Detach or Disconnect a Exchange Mailbox from a user account use Disable-Mailbox in powershell. This removes the exchange attributes from the user account in Active Directory.

To reattach the mailbox to another user account use Connect-Mailbox

You can also permanently delete a disconnected mailbox at any time by using the Remove-Mailbox cmdlet in the Exchange Management Shell

Use the Clean-MailboxDatabase cmdlet to scan the Active Directory directory service for disconnected mailboxes that are not yet marked as disconnected in the Microsoft Exchange store and update the status of those mailboxes in the Exchange store

Flush Transaction Logs in Exchange

This article applies to all versions of Exchange from 5.5 to 2010.

The following knowledge base article gives you all the fruit about flushing transaction logs but I assume you just want to know how to do it right?

http://support.microsoft.com/kb/240145

Your Exchange Logs get deleted when your database backup completes. When your exchange server receives an email it dumps the email to the transaction logs. When the exchange server free's up it then plays these logs into the database. Sometimes Exchange may not have played all the log files into the database, so you cant simply "delete" them.

1. Dismount the all Exchange Mailbox Databases under the Storage Group you wish to clean up.

2. Use the ESEUTIL program to view if all the logs have been played into the Exchange Database.

eseutil /MH database.edb



If all the databases are in a Clean Shutdown or Consistent state, you may remove all the transaction logs. Older versions say "Consistent", New Versions of Exchange say "Clean Shutdown". In my screenshot I'm using Exchange 2010.

Note: If it is not in a "Clean Shutdown" or "Consistent" state, you can use eseutil to reply the log files into the database or remount the database and allow Exchange to replay them.
Caution: Do not delete log files if the state is not "Clean Shutdown" or "Consistent" as you will loose email!

3. Delete all log files including the chk file. The checkpoint file keeps track of which log files have been and have not been played into the database. Since there are no log files anymore, the checkpoint is not needed.

Caution: If your database is in the same directory as your log files be careful you dont accidently delete your edb database file as well!

4. Re-mount your exchange databases in your storage group. This will automatically create a new checkpoint file ready to go!

A quick way to determine your bridgehead servers?

You want to determine which bridgehead servers have been elected in each Active Directory site to troubleshoot replication issues?

Use the following command:

repadmin /bridgeheads

Outlook does not Redirect to Exchange 2010 SP1 CAS Array

Problem:

You have a single Exchange 2010 SP1 server "Ex2010.domain.local" running HT, MBX and CAS roles. You move a mailbox from the Exchange 2010 SP1 install to a new Exchange 2010 SP1 CAS Array installation "CASArray01.domain.local".

Outlook 2003, 2007 and 2010 will still points at the mailbox "Ex2010.domain.local", it will not automatically update and point at "CASArray01.domain.local". This is because the RPC CA service doesn't respond with a "ecWrongServer" like previous versions of Exchange did.

Microsoft is aware of this issue however their is no easy resolution in terms of a little code tweak.

How do I prevent this from happening:

Microsoft has been telling customers for a long time to always create a CAS Array even if they have one server - they need a one server array. If all servers single servers were setup in an Array from the beginning this problem would not exist.

Is there a way to force all Outlook clients to automatically perform a full re-autodiscover and attach to the new server?

Yes - if you remove the "Host A" record from DNS for the old Exchange 2010 server old Exchange 2010 server "Ex2010.domain.local" the Outlook clients should do a full re-autodiscover and attach to the new CAS array "CASArray01.domain.local" automatically.

This however is generally impractical especially when you want to stage your mailbox move slowly instead of attempt the big bang approach where all mailboxes are moved in one hit. For small server migrations this is a workable solution.

Is there another work around other then removing a Host A record from DNS?

Yes - create a PRF (Outlook Profile) configuration file to automatically update Outlook to point to the new server. You will need to script this out to ensure it automatically runs on all workstations.

http://technet.microsoft.com/en-us/library/cc179062.aspx

Please look at this article for information on pushing these settings via Group Policy or Script:

http://www.howto-outlook.com/howto/deployprf.htm

DO NOT USE - Outlook Cached Exchange Mode

Cached Exchange Mode is the process of when 2003/2007/2010 downloading a copy of the users mailbox and storing it locally on their workstation. This means all emails opened by the user from there onwards does not hit the Exchange servers significantly reducing load.

Many clients however still disabled cached Exchange mode on their users workstations. When asking them "why", their answer is always:

Because we need the user can access the most updated address book when they click the global address book.

If your company has this requirement this doesn't mean you need to disable Cached Exchange Mode. You can configure a registry key on your clients to simply keep the address book in online mode.

For more information on this key for Outlook 2003/2007/2010 please see:

http://support.microsoft.com/kb/841273

Generally the only time you want to disable cached exchange mode is if your users run on a terminal services or Citrix shared environment where you do not want a copy of EVERY users mailbox downloaded and stored locally on the terminal server!