See also Virtualizing Exchange Server
See also Migrating to a New Mail Server
See also http://www.mustbegeek.com/configure-url-redirection-in-exchange-2013/
Get-Service | Where {$_.DisplayName -Like "*Exchange*"} | ft DisplayName, Name, Status
Stop Services:
Get-service -name "msexchange*" -dependentservices | Where-Object {$_.Status -eq 'Running'} | Stop-Service
Start Services:
Get-service -name "msexchange*" -dependentservices | Where-Object {$_.Status -eq 'stopped'} | Start-Service
Using net stop
:
net stop msexchangeadtopology /y net stop msexchangefba /y net stop msftesql-exchange /y net stop msexchangeis /y net stop msexchangesa /y net stop HostControllerService net stop MSExchangeHM net stop MSExchangeDiagnostics net stop MSExchangeADTopology net stop FMS
and net start
:
net start FMS net start MSExchangeADTopology net start MSExchangeDiagnostics net start MSExchangeHM net start HostControllerService net start msexchangeIS net start msexchangeServiceHost net start msexchangeMailboxAssistant net start msexchangeDelivery net start msexchangeSubmission net start msexchangeMailboxReplication net start msexchangeTransport net start msexchangeTransportLogSearch net start msexchangeThrottling net start msexchangeFrontEndTransport net start msexchangeFastSearch net start msexchangeRPC net start msexchangeUM net start msexchangeUMCR net start msexchangeEdgeSync net start msexchangeDAGMgmt net start msexchangeRepl net start msexchangeAntiSPAMUpdate net start msexchangeIMAP4 net start msexchangeIMAP4BE
net stop msexchangeadtopology /y net stop msftesql-exchange /y net stop msexchangeis /y net stop msexchangesa /y net stop iisadmin /y
net start "World Wide Web Publishing Service" net start "Microsoft Exchange Information Store" net start "Microsoft Exchange System Attendant" net start "Microsoft Search (Exchange)" net start "Microsoft Exchange Information Store" net start "Microsoft Exchange Unified Messaging" net start "Microsoft Exchange Transport Log Search" net start "Microsoft Exchange Transport" net start "Microsoft Exchange Service Host" net start "Microsoft Exchange Search Indexer" net start "Microsoft Exchange Replication Service" net start "Microsoft Exchange Mail Submission" net start "Microsoft Exchange Mailbox Assistants" net start "Microsoft Exchange File Distribution" net start "Microsoft Exchange EdgeSync" net start "Microsoft Exchange Anti-spam Update"
Diagnostic-Code: smtp;550 5.7.1 RESOLVER.RST.AuthRequired; authentication required
The email problems I was having where with Distribution Groups I had created in Exchange 2007 under Recipient Group, then under Distribution Group, You have to go to the properties of the email account in question and go under the TAB “Mail flow settings”. There under Message Delivery Restrictions make sure that there is NO check mark box inside of “require that all senders are authenticated”.
https://www.petenetlive.com/KB/Article/0001224
Database maintenance operations such as offline defragmentation take so long that it is often recommended to simply create a new database, move mailboxes (online) to the new database, then delete the old database instead.
Exchange Admin Center → Servers → Databases → <database> → Edit → Maintenance → Enable Circular Logging → Save
Set-MailboxDatabase <Database-Name> -CircularLoggingEnabled $True net stop "Microsoft Exchange Information Store" net start "Microsoft Exchange Information Store"
https://www.phy2vir.com/restore-a-deleted-mailbox-in-exchange-2013/
Show recently deleted databases:
Get-MailboxDatabase | Get-MailboxStatistics | Where {$_.DisconnectReason -eq "Disabled"} | fl DisplayName,MailboxGuid,LegacyDN,Database,TotalItemSize
Restore a recently deleted mailbox (recreate destination user and mailbox first):
New-MailboxRestoreRequest -SourceStoreMailbox <MailboxGuid> -SourceDatabase <Database> -TargetMailbox <Target Mailbox Name> -AllowLegacyDNMismatch -LargeItemLimit Unlimited -AcceptLargeDataLoss Get-MailboxRestoreRequest | Get-MailboxRestoreRequestStatistics
https://docs.microsoft.com/en-us/powershell/module/exchange/mailboxes/resume-mailboxrestorerequest
Status of restore requests:
Get-MailboxRestoreRequest | Get-MailboxRestoreRequestStatistics
Collect details of failed restore requests:
Get-MailboxRestoreRequest -Status failed | Get-MailboxRestoreRequestStatistics -IncludeReport | format-list > c:\users\"username"\restore_report.txt
Set-MailboxRestoreRequest -Identity "Identity" -LargeItemLimit Unlimited -AcceptLargeDataLoss
Always use New-MailboxRestoreRequest
, but you can try the older Restore-Mailbox
as a fallback.
Cleanup:
Get-MailboxRestoreRequest -Status Completed | Remove-MailboxRestoreRequest
You may need to do a database repair first!
https://gallery.technet.microsoft.com/office/Recover-mailbox-from-edb-0635d717
https://www.nucleustechnologies.com/blog/how-to-restore-exchange-2016-mailboxes/
eseutil /p
and eseutil /d
run at about 3-5GB of data per hour.
Recovery Plan Outline: http://forums.msexchange.org/fb.aspx?m=1800504795
http://msexchangeguru.com/2013/02/01/jet_errmissinglogfile-528-548/
http://msexchangeguru.com/2011/03/02/databse-repair/
http://msexchangeguru.com/2009/07/12/exchange-database-recovery-using-eseutil-commands/
http://exchangeserverpro.com/restore-individual-mailbox-exchange-2010#eseutil
If you can, you might consider shutting down all Exchange services at this point.
Check “state” of database:
eseutil /mh "C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox Database\Mailbox Database.edb"
If the state is “clean shutdown”, move all the log files from the Transaction logs folder location and then mount the stores.
If Dirty:
Check log files:
eseutil /ml "C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox Database\E00"
Add /a
to skip missing logfile.
If the log files are healthy, then perform the Soft recovery:
eseutil /r E00 /l "C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox Database" /d "C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox Database\Mailbox Database.edb"
If the soft recovery runs without error but the state is still dirty, you can run a full recovery:
Make a backup of the database first!
eseutil /p "C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox Database\Mailbox Database.edb"
If you only plan to salvage data from the disk, and do not plan to put it back in production, you can skip defragmentation to save time.
Now we defragment the database:
eseutil /d
defragment temp file location defaults to %windir%\System32\
and the files are named xxxxxxx.EDB
and xxxxxxx.INTEG.RAW
.
/d
, you must remove any log files before mounting the database.
eseutil /d <database_path_and_file_name> /t <temp_database_path_and_file_name>
eseutil /d "C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox Database\Mailbox Database.edb" /t "E:\TempDefrag.edb"
Now we logically repair the database and reindex:
The MSExchangeIS
service must be running and the database dismounted.
This command is gone as of Exchange 2013.
isinteg -s servername -fix -test alltests
If you can, restore the mailboxes without restoring from backup.
Here we have restored the database and log files from backup:
Check for Clean Shutdown:
eseutil /mh "x:\path\to\restored\mailboxdb.edb"
Create a new recovery database in Exchange using the restored databse file and logs:
New-MailboxDatabase -Recovery -Name RecoveryDB -Server SERVERNAME -EdbFilePath "x:\path\to\restored\mailboxdb.edb" -LogFolderPath "x:\path\to\restored\logs\" Get-MailboxStatistics -Database RecoveryDB | ft –auto
Get-MailboxStatistics -Database RecoveryDB | where displayname -eq "User Name"
You must add -AllowLegacyDNMismatch
if you merge to a new account.
Add -TargetRootFolder
if desired.
New-MailboxRestoreRequest -SourceDatabase RecoveryDB -SourceStoreMailbox "SourceUser Name" -TargetMailbox "TargetUser Name" -AllowLegacyDNMismatch -TargetRootFolder "Restored Items" Get-MailboxRestoreRequest | Get-MailboxRestoreRequestStatistics
Cleanup:
Get-MailboxRestoreRequest -Status Completed | Remove-MailboxRestoreRequest
To export to PST, you must recover the mailbox first.
New-MailboxExportRequest -Mailbox username -FilePath \\server\share\path\username.pst Get-MailboxExportRequest | Get-MailboxExportRequestStatistics
https://practical365.com/exchange-server/exchange-2016-failed-content-index/
Rebuilding the search index will cause high CPU load.
Get-MailboxDatabaseCopyStatus * | sort name | Select name,status,contentindexstate Stop-Service MSExchangeFastSearch Stop-Service HostControllerService Get-MailboxDatabase Get-MailboxDatabase "Mailbox Database 000000000" | select EdbFilePath
Using File Manager, delete the sub-folder with a GUID for the name containing the content index files.
Start-Service MSExchangeFastSearch Start-Service HostControllerService
Wait a while, then recheck the contentindexstate
. The status will change to crawling
.
https://<serverFQDN>/mapi/emsmdb/
or
Get-ExchangeServer | fl name,AdminDisplayVersion
Then cross-reference here:
Exchange database consistency check (for full backup):
eseutil /k /i "C:\Program Files\Microsoft\Exchange Server\V14\Mailbox\Mailbox Database\Mailbox Database.edb"