How do I find out if Exchange Search is working for a particular Mailbox user or enabled on a Mailbox Database?

  • To test whether Exchange search is working for a particular user’s mailbox, run the following command (needs perms to write to the mailbox)
Test-exchangeSearch <mailbox name>
  • To see which Mailbox databases are enabled for Exchange Search, run the following command:
Get-MailboxDatabase |select name, indexenabled

How to renew self-signed certificate on Exchange 2k7 server

To renew a self-signed certificate, use this pshell command:
 
Get-ExchangeCertificate -Thumbprint 67455EECD51C972C2DFDAE56CF927B8851C73048 | New-ExchangeCertificate
To remove the old certificate use this command
Remove-ExchangeCertificate with the thumbprint value of the old certificate for eg:
Remove-ExchangeCertificate -Thumbprint  E3ED4FE364679696969AF93148A024669AE4CF4E

Track messages with message id

Message tracking is easier and faster with message id. This message can be retrieved from Ironport. So if you can get message id from Ironport, hand-off server name and time, the search will go better and quicker. While in Exchange powershell, use the command below to find the message status and export to CSV file.
 
 
get-messagetrackinglog -Server “ServerName” -MessageID “<BE2BA0B06D1DF24AA8FBE8319637DC3F051EB07205@MAIL1.TEST.org>” -Start “4/12/2010 1:06:0
0 PM” -End “4/12/2010 1:26:00 PM” | export-csv c:april.csv

Working with disconnected mailboxes

Working with disconnected mailboxes
Deleted mailboxes will appear in disconnected mailbox list, but it will not reflect immediately. Typically,You have to wait for online maintenance to run and complete.

If you accidentally delete a mailbox, you will not be able to find it in Disconnected Mailbox immediately. You have to  run Clean-MailboxDatabase to get the deleted mailbox. * If it is not appearing in the disconnected mailbox view run one of the following commands from powershell
To Clean Database of Individual Store, run
Clean-MailboxDatabase servernameSGNameStore
 
To clean all databases on a specific server
Get-Mailboxdatabase | Where{ $_.Server –eq “servername”}| clean-MailboxDatabase
  
 To Clean all the database in the Organization 
Get-Mailboxdatabase | Clean-MailboxDatabase
 
To Clean all the database on a specific server
Get-Mailboxdatabase | Where{ $_.Server –eq “servername”}| clean-MailboxDatabase
 
To Clean all the Database which matches the specific name given in Databasename
Get-Mailboxdaatabase | Where{ $_.Name –eq “<DatabaseName>”}| clean-MailboxDatabase
To find Disconnected mailboxes on a particular server:
Get-MailboxStatistics -Server servername | where { $_.DisconnectDate -ne $null } | select DisplayName,DisconnectDate
 
 
To connect a user id to a disconnected mailbox:
Connect-mailbox –database <mailbox database name> –Identity <disconnected mailbox name> –User <User to connect to>

How to manually remove Exchange 2007

(Note:not supported by MSFT)
  1. Run setup /m:uninstall
  2. Stop and disable all the Exchange 2007 services
  3. Use Registry Editor (Start->Run->Regedit) to remove these Exchange related registry keys:
    • HKLMSOFTWAREMicrosoftExchange
    • HKLMSYSTEMCurrentControlSetServicesMSExchange* (all the keys starting with “MSExchange”)
    • HKLMSOFTWAREMicrosoftWindowsCurrentVersionUninstallMicrosoft Exchange
  4. Remove the entire Web Server role (don’t forget to reinstall afterwards as it’s a prerequisite for E2K7!)
  5. Remove the Exchange 2007 server from Active Directory. I ended up deleting the entire “Microsoft Exchange” branch from ADSIEdit (Configuration Container > Services > Microsoft Exchange) as my Org only counts one server.
  6. Use Windows Explorer to delete:
    • C:Program FilesMicrosoftExchange Server
    • C:ExchangeSetupLogs
  7. Consider using Windows Installer CleanUp Utility to remove all the exchange related info from the installer database.
  8. Remove the security groups created by Exchange setup from AD

How to test Exchange search for Outlook user in online mode

This test is for online mode users only. Cache mode users use windows desktop search to search mail
 
use the command below to test exchange search on the server for a specific user
 
Test-Exchangesearch -id user@contoso.com
 
if test returns true, indexing is working fine. if false, then indexing needs to be reset with powershell or manually by restarting MS Exchange search service
 
OR
 
test against a mailbox database by typing
 
Test-ExchangeSearch -MailboxDatabase “databasename” -indexingtimeout 30

Assign send-as, receive-as and administer info store permissions

Assigning send-as, receive-as, and administer information store permissions to a user account, for eg besadmin
 
use this powershell script:

get-mailboxserver “servername” | add-adpermission -user besadmin -accessrights GenericRead, GenericWrite -extendedrights Send-As, Receive-As, ms-Exch-Store-Admin