|

Exchange Event Logs CMDlets

Exchange Event Log Powershell CMDlets

To view only the Exchange-related services that are currently running

Get-Service *exch* | Where-Object {$_.Status -eq ‘Running’}

The following example retrieves the services from every Exchange server in the organization:

Get-ExchangeServer | ForEach-Object {Get-Service *exch* -ComputerName $_.Name |Where-Object {$_.Status -eq ‘Running’}}

Get Events after specified Date

Get-EventLog -LogName application -after 1/9/2019 | where {$_.Entrytype -eq “Error”} | ft -wrap -autosize

Get Events after specified Date and Source

Get-EventLog -LogName application -after 1/9/2019 -source MSExchangeIS | Ft -wrap -autosize

Get Events after specified Date with Source only Warning and Error

Get-EventLog -LogName application -after 1/9/2019 -source MSExchangeIS | where {($_.Entrytype -eq “Warning” -or $_.Entrytype -eq “Error”)} -wrap -autosize

Get Specificied number of Events with Source only Warning and Error

Get-EventLog -LogName application -Newest 50 -source MSExchangeIS | where {($_.Entrytype -eq “Warning” -or $_.Entrytype -eq “Error”)} -wrap -autosize

Get Application Events after specified Date and Entrytype with a Specified word in the Message Field

Get-EventLog -LogName application -after 1/9/2019 | where {$_.Entrytype -eq “Error”}| Where-Object { $_.Message -match “mailbox” } | ft -wrap -autosize

Get Application Events after specified Date, Source and Entrytype with a Specified word in the Message Field

Get-EventLog -LogName application -after 1/9/2019 -source MSExchangeIS | where {($_.Entrytype -eq “Warning” -or $_.Entrytype -eq “Error”)}| Where-Object { $_.Message -match “mailbox” } | ft -wrap -autosize

Get Event by INDEX (unique qualifier)

Get-EventLog -LogName application -index 194201 | ft -wrap -autosize

Similar Posts

  • Edge Transport Server

    The Edge Transport server role is available from Exchange 2013 Service Pack 1. This server role is deployed in the perimeter network and outside the Active Directory forest. Edge Transport servers don’t have direct access to Active Directory for configuration and recipient information in the way Client Access or Mailbox servers do. The Edge Transport…

  • | | |

    Managing Mailbox Permissions CMDlets

    Managing Mailbox Permissions PowerShell Commands Grant Send on Behalf of Permissions Set-Mailbox ‘user@domain.com’ -GrantSendOnBehalfTo ‘user@domain.com’ Add Editor permissions Add-MailboxFolderPermission -Identity ‘user@domain.com’ -User ‘user@domain.com’ -AccessRights Editor Add Reviewer permissions (what if) Set-MailboxFolderPermission -Identity ‘user@domain.com’ -User ‘user@domain.com’ -AccessRights Reviewer -whatif Getting Mailbox Folder Permissions Get-MailboxFolderPermission -Identity ‘user@domain.com’ | fl Get-MailboxFolderPermission -Identity user@domain.com:\inbox Impersonation Rights New-ManagementRoleAssignment Name:RoleName -Role:ApplicationImpersonation -User:’domain\alias’…

  • DAG Management CMDlets

    DAG Management PowerShell Commands Get DAG Status Get-DatabaseAvailabilityGroup <dag name> -Status | fl StartDagServerMaintenance.ps1 script to put the DAG member in maintenance mode .\StartDagServerMaintenance.ps1 -serverName <server name> StopDagServerMaintenance.ps1 script to take the DAG member out of maintenance mode .\StopDagServerMaintenance.ps1 -serverName <server name> Find DatabaseCopyAutoActivationPolicy for all Servers Get-MailboxServer | Sort-Object -Property DatabaseCopyAutoActivationPolicy | ft name,DatabaseCopyAutoActivationPolicy…

Leave a Reply

Your email address will not be published. Required fields are marked *