Common Command

<List existing exchange server>

<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>

-Identity Aliasname
-Database Databasename
-Server Servername



Change Thumbprint Command

After change IIS Cert please change the thumbprint by command.


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.



Move Mailbox Command

New-MoveRequest -Identity '' -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 '' -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