Common Command

Get-ExchangeServer
<List existing exchange server>

Test-ServiceHealth
<List all Exchange Server health status>

Get-ServerComponentState -Identity <ServerName>
<Command for check Exchange Server Component Status>
Set-ServerComponentState -State Active -Requester Functional -Identity <ServerName> -Component ServerWideOffline
<Command for Enable Activa all Server Component>

 

Get-ExchangeServer | FL Name,Edition,AdminDisplayVersion
<List all Server Name, Edition and Version>

Get-Queue | Format-List
<List the Quene>

Get-MAilbox -Server Exchange | Get-MailboxStatistics | Select DisplayNAme, TotalItemSize, TotalDeletedItemSize, DatabaseName | FT
<Get All mailbox detail with deleted item>

Get-MAilbox -Server Exchange | Get-MailboxStatistics | Select DisplayNAme, TotalItemSize, DatabaseName | FT
<Get All mailbox detail>

Test-OutlookConnectivity -RunFromServerID LAB-EX16 -ProbeIdentity OutlookMapiHttpSelfTestProbe
<Test Outlook Connectivity>

Set-ExchangeServer ExServer01 -ProductKey XXXXX-XXXXX-X...
<Set Key for Activate Exchange Server>

Get-Mailbox -Arbitration | FL Name,DisplayName,ServerName,Database,AdminDisplayVersion
<Set Key for Activate Exchange Server>

Get-MailboxStatistics -Server EX2016 | Sort LastLogonTime -Descending
<Get Exchange Server all mailbox Last Logon Time>

Option
-Identity Aliasname
-Database Databasename
-Server Servername

 

 


Change Thumbprint Command

After change IIS Cert please change the thumbprint by command.

$date=Get-Date

Set-AuthConfig -NewCertificateThumbprint <thumbprint> –NewCertificateEffectiveDate $date

 

Error or OWA/ECP can’t sign in prompt

Unable to find the certificate with thumbprint XXX in the current computer or the certificate is missing private key. The certificate is needed to sign the outgoing token.

Solution: https://social.technet.microsoft.com/Forums/office/en-US/e510d5fb-210b-4961-818e-0c7585a6a993/unable-to-find-the-certificate-with-thumbprint-xxx-in-the-current-computer-or-the-certificate-is?forum=Exch2016GD

 


Move Mailbox Command

New-MoveRequest -Identity 'tony@alpineskihouse.com' -TargetDatabase "DB01" -WhatIf
This example tests a mailbox’s readiness to move to the new database DB01 within the same forest and for completeness of the command by using the WhatIf switch. When you use the WhatIf switch, the system performs checks on the mailbox, and if the mailbox isn’t ready, you receive an error.

New-MoveRequest -Identity 'tony@alpineskihouse.com' -TargetDatabase "DB01"
This example moves Tony Smith’s mailbox to the new database DB01.

Get-Mailbox -Database DB01 | New-MoveRequest -TargetDatabase DB02 -BatchName "DB01toDB02"
This example creates a batch move request for all mailboxes on the database DB01 and moves them to the database DB02 with the BatchName parameter value DB01toDB02.

 

 


Enable Pop/Imap Logging

Set-PopSettings -Server "CAS01" -ProtocolLogEnabled $true -LogFileLocation "C:\Pop3Logging"

LogFileRollOverSettings: This parameter defines how frequently POP3 or IMAP4 protocol logging creates a new log file. By default, a new log file is created every day. The possible values are:
Hourly, Daily, Weekly, Monthly

Set-PopSettings -Server "CAS01" -LogPerFileSizeQuota 0 -LogFileRollOverSettings Daily

https://docs.microsoft.com/en-us/exchange/configure-protocol-logging-for-pop3-and-imap4-exchange-2013-help