Archiv für den Monat: April 2015

follow the message through Exchange logs

you have to enable connecotor logs with verbose log level!

  1. find session id on receive in
    C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\FrontEnd\ProtocolLog\SmtpReceive
    search recipient or sender….you will find also the message id!!!
  2. show all lines of this session
    @(Get-Content -Path „C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\FrontEnd\ProtocolLog\SmtpReceive\RECV20150429-1.LOG“) -match „08D24ED360CF3B98“ | Out-GridView
    see connector id, etc.
  3. find session id on send to hup
    C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\FrontEnd\ProtocolLog\SmtpSend
    search by message id, recipient or sender…
  4. search session id in current log file of frontend send connectors
    @(Get-Content -Path „C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\FrontEnd\ProtocolLog\SmtpSend\SEND20150429-1.LOG“) -match „08D24ED360CF3B98“ | Out-GridView

    do the same for following files

  5. C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\ProtocolLog\SmtpReceive\RECV20150429-1.LOG
  6. C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Hub\ProtocolLog\SmtpSend\SEND20150429-1.LOG
  7. C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\Mailbox\ProtocolLog\SmtpReceive\Delivery\RECV20150429-1.LOG

set higher level of connector logs

connector logs have a rollover for log files, so if you set a high level for logging, you may have a fewer time range, but more Information

Get-ReceiveConnector | Set-ReceiveConnector -ProtocolLoggingLevel Verbose
Get-TransportService | Set-TransportService -IntraOrgConnectorProtocolLoggingLevel verbose
Get-MailboxTransportService | Set-MailboxTransportService -MailboxDeliveryConnectorProtocolLoggingLevel Verbose

for Exchange 2013

Einen Client-Request in Exchange 2013 verfolgen

um einen Client-Request am Exchange-Server zu verfolgen

  • Welcher Server? wo kommt der request an?
    https://exchangehostname/mapi/emsmdb
    ping exchangehostname
  • HTTP-Log um die Request ID zu erlangen
    C:\inetpub\logs\LogFiles\W3SVC1 (W3SVC1 ist bei Multi-Role-Server der CAS, W3SVC2 ist der MBX – sieht man auch an der ID in der IIS Administration)
  • Abhängig vom Client-Typ sucht man nach dem Request (um den Verbindungstyp bei Outlook festzustellen, in der Taskleiste im „Notification area“ mit aktiver STRG-Taste ein Rechtsklick auf das Outlook-Symbol und den „Verbindungsstatus…“ anzeigen – bei Protokoll findet man nun den Verbingunstyp)
    für Outlook mit RPC/HTTP sucht man dann nach „/rpc“ oder auch bei ECP „/ViewUserMailboxDetails.aspx“
  • muss in Folge im richtigen HTTP-Proxy-Verzeichnis gesucht werden
    RCP via Outlook C:\Program Files\Microsoft\Exchange Server\V15\Logging\HttpProxy\RpcHttp
    ECP via Browser: C:\Program Files\Microsoft\Exchange Server\V15\Logging\HttpProxy\Ecp
    hier findet man dann mit obiger ID auf welchen Exchange-Server man weitergeleitet wurde bzw. auch die Mailbox-ID etc.
  • auf dem Exchange-Server muss dann im Backend gesucht werden
    beginnend mit dem aktuellen IIS-Log: in C:\inetpub\logs\LogFiles\W3SVC2 nach obiger ID durchsuchen
  • in Folge die Exchange Backend Logs
    • RCP via Outlook C:\Program Files\Microsoft\Exchange Server\V15\Logging\RpcHttp\W3SVC2 (W3SVC wieder abhängig von der ID im IIS)
      • weiter im RCP Client Access-Log
        C:\Program Files\Microsoft\Exchange Server\V15\Logging\RPC Client Access
        hier finde ich ob der Logon funktioniert hat bzw. auch einen Access Denied oder ob der aktuelle User auch in der Rolle „Owner“ zugegriffen hat (=OwnerLogon) oder über eine Freigabe (=DelegateLogon)
    • MAPI via Outlook C:\Program Files\Microsoft\Exchange Server\V15\Logging\MAPI Client Access
    • ECP via Browser:
      • unter C:\Program Files\Microsoft\Exchange Server\V15\Logging\ECP\Activity findet man ob man angekommen ist
      • unter C:\Program Files\Microsoft\Exchange Server\V15\Logging\ECP\Server findet man was gemacht wurde

log rollover for Exchange 2013 server

use forfiles (or something like that) for log rollover of Exchange Server to free up disk space – implement it for following folders

C:\Program Files\Microsoft\Exchange Server\V15\Bin\Search\Ceres\Diagnostics\ETLTraces
C:\Program Files\Microsoft\Exchange Server\V15\Bin\Search\Ceres\Diagnostics\Logs
C:\Program Files\Microsoft\Exchange Server\V15\Logging
C:\Program Files\Microsoft\Exchange Server\V15\Logging\Diagnostics\PerformanceLogsToBeProcessed
C:\Program Files\Microsoft\Exchange Server\V15\Logging\Monitoring\Monitoring\MSExchangeHMWorker\ActiveMonitoringTraceLogs
C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\data\Temp
C:\inetpub\logs

exp: forfiles /p C:\inetpub\logs /m *.log /s /d -10 /c „cmd /c DEL @path“

alternativ with Powershell:

Function Remove-ToolsLog($olderThenDays){

Set-ToolsLogAddLine -LogTXT „Remove old log files“ -Foregroundcolor „green“

$logPath = Split-Path $Script:LogFilePath -Parent

Get-ChildItem -path $logPath | Where-Object { !$_.PSIsContainer -and $_.Extension -eq „.log“ -and $_.CreationTime -lt (Get-Date).AddDays($olderThenDays) } | Remove-Item -Force

}