Exchange Server

Exchange Server Health Check Script

Exchange Server üzerinde sorunlar yaşıyor olabilirsiniz veya sistem durumunu denetlemek isteyebilirsiniz. Exchange server için sistem durum denetlemesinin en iyi yolu nedir? Ortamınıza yeni exchange server kurulumu yaparak DAG genişlemeside yapmayı düşünüyor olabilirsiniz, bu tip senaryolarda önce mevcut sistemin sağlığını kontrol etmekte fayda var. O zaman Exchange Server için hazırlanmış HealtCheck scripti tam bizim için hazırlanmış diyebiliriz.

Exchange Server Healt Check komut dosyası, performans sorunlarına neden olduğu bilinen yaygın yapılandırma sorunlarının ve Exchange Ortamında basit bir yapılandırma değişikliğinin neden olduğu diğer uzun süre çalışan sorunların algılanmasına yardımcı olur. Ayrıca, sunucunuzun ortak bilgi toplama sürecini hızlandırmaya yardımcı olmak için sunucunuzun yararlı bilgilerini toplamaya yardımcı olmaktadır.

Exchange Server Health Check Sistem Gereksinimleri

Healt Check scriptinin çalışması için gerekli sistem gereksinimleri şu şekildedir;

Exchange Server 2013 – Exchange Server 2016 – Exchange Server 2019

Exchange Server Health Check Script İndirme ve Kullanma Yöntemleri

Exchange Health Check scriptini resmi sayfadan indirebilirsiniz.

HealthChecker – Microsoft – CSS-Exchange

Bu ürün %100 PowerShell üzerinde çalışmaktadır ve sürekli ekip tarafından güncellenmektedir. Herhangi bir geri bildiriminiz olursa [email protected] adresine e-posta ile gönderebilirsiniz.

İndirmiş olduğunuz scripti C:\scripts klasörüne taşıyın.

[PS] C:\scripts>.\HealthChecker.ps1 -Server "EX01-2016"
Exchange Health Checker version 3.1.1
Virtual Machine detected.  Certain settings about the host hardware cannot be detected from the virtual machine.  Verify on the VM Host that:

    - There is no more than a 1:1 Physical Core to Virtual CPU ratio (no oversubscribing)
    - If Hyper-Threading is enabled do NOT count Hyper-Threaded cores as physical cores
    - Do not oversubscribe memory or use dynamic memory allocation

Although Exchange technically supports up to a 2:1 physical core to vCPU ratio, a 1:1 ratio is strongly recommended for performance reasons.  Certain third party Hyper-Visors such as VMWare have their own guidance.

VMWare recommends a 1:1 ratio.  Their guidance can be found at https://www.vmware.com/files/pdf/Exchange_2013_on_VMware_Best_Practices_Guide.pdf.
Related specifically to VMWare, if you notice you are experiencing packet loss on your VMXNET3 adapter, you may want to review the following article from VMWare:  http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2039495.

For further details, please review the virtualization recommendations on Microsoft Docs at the following locations:
Exchange 2013: https://docs.microsoft.com/en-us/exchange/exchange-2013-virtualization-exchange-2013-help#requirements-for-hardware-virtualization.
Exchange 2016/2019: https://docs.microsoft.com/en-us/exchange/plan-and-deploy/virtualization?view=exchserver-2019.


Exchange Information
--------------------
        Name: EX01-2016
        Version: Exchange 2016 CU17
        Build Number: 15.1.2044.4
                Error: Out of date Cumulative Update. Please upgrade to one of the two most recently released Cumulative Updates. Currently running on a build that is 194 days old.
        Server Role: Mailbox
        MAPI/HTTP Enabled: True
        Exchange Server Maintenance: Server is not in Maintenance Mode

Operating System Information
----------------------------
        Version: Microsoft Windows Server 2016 Standard Evaluation
        System Up Time: 2 day(s) 16 hour(s) 34 minute(s) 28 second(s)
        Time Zone: W. Europe Standard Time
        Dynamic Daylight Time Enabled: True
        .NET Framework: 4.8
        Page File Size: Error: System is set to automatically manage the pagefile size.
        Power Plan: Balanced --- Error
        Http Proxy Setting: <None>
        Visual C++ 2012: Redistributable is outdated
        Visual C++ 2013: Redistributable is outdated
                Note: For more information about the latest C++ Redistributeable please visit: https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads
                This is not a requirement to upgrade, only a notification to bring to your attention.
        Server Pending Reboot: False

Processor/Hardware Information
------------------------------
        Type: VMWare
        Processor: Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
        Number of Processors: 4
                Note: Please make sure you are following VMware's performance recommendation to get the most out of your guest machine. VMware blog 'Does corespersocket Affect Performance?' https://blogs.vmware.com/vsphere/2013/10/does-corespersocket-affect-performance.html
        Number of Physical Cores: 4
        Number of Logical Cores: 4
        Hyper-Threading: Disabled
        All Processor Cores Visible: Passed
        Max Processor Speed: 2304
        Physical Memory: 12 GB

NIC Settings Per Active Adapter
-------------------------------
        Interface Description: vmxnet3 Ethernet Adapter [Ethernet0]
                Driver Date: 2019-07-11
                Driver Version: 1.8.16.0
                MTU Size: 1500
                RSS Enabled: True
                Link Speed: 10000 Mbps --- This may not be accurate due to virtualized hardware
                IPv6 Enabled: True
                IPv4 Address:
                        Address: 192.168.1.52\24 Gateway: 192.168.1.1
                IPv6 Address:
                DNS Server: 192.168.1.51
                Registered In DNS: True
                Sleepy NIC Disabled: False --- Warning: It's recommended to disable NIC power saving options
                        More Information: http://support.microsoft.com/kb/2740020
                Packets Received Discarded: 0

Frequent Configuration Issues
-----------------------------
        TCP/IP Settings: Not Set
                Error: Without this value the KeepAliveTime defaults to two hours, which can cause connectivity and performance issues between network devices such as firewalls and load balancers depending on their configuration.
                More details: https://techcommunity.microsoft.com/t5/Exchange-Team-Blog/Checklist-for-troubleshooting-Outlook-connectivity-in-Exchange/ba-p/604792
        RPC Min Connection Timeout: 0
                More Information: https://blogs.technet.microsoft.com/messaging_with_communications/2012/06/06/outlook-anywhere-network-timeout-issue/
        CTS Processor Affinity Percentage: 0
        Credential Guard Enabled: False

Security Settings
-----------------
        LmCompatibilityLevel Settings: 3
                Description: Clients use only NTLMv2 authentication, and they use NTLMv2 session security if the server supports it. Domain controllers accept LM, NTLM, and NTLMv2 authentication.
        TLS 1.0
                Server Enabled: True
                Server Disabled By Default: False
                Client Enabled: True
                Client Disabled By Default: False
        TLS 1.1
                Server Enabled: True
                Server Disabled By Default: False
                Client Enabled: True
                Client Disabled By Default: False
        TLS 1.2
                Server Enabled: True
                Server Disabled By Default: False
                Client Enabled: True
                Client Disabled By Default: False
        Certificate:
                FriendlyName: Microsoft Exchange Server Auth Certificate
                Thumbprint: 96AC7BAD02F000A6C9B0DFEB5F15A59FE396D5F2
                Lifetime in days: 1758
                Key size: 2048
                Bound to services: SMTP
                Current Auth Certificate: True
                SAN Certificate: False
                Namespaces:
                        Microsoft Exchange Server Auth Certificate
        Certificate:
                FriendlyName: Microsoft Exchange
                Thumbprint: 8CF11037A346A3BE602E99171FFB32C07F3F2196
                Lifetime in days: 1784
                Key size: 2048
                Bound to services: IMAP, POP, IIS, SMTP
                Current Auth Certificate: False
                SAN Certificate: True
                Namespaces:
                        EX01-2016
                        EX01-2016.exoip.local
        Certificate:
                FriendlyName: mail.exoip.com @ 2020/10/3 16:46:13
                Thumbprint: 11A8E3212103DD17734E46F5F4DFEA1ABC41AD35
                Lifetime in days: 5
                Key size: 3072
                Bound to services: IIS, SMTP
                Current Auth Certificate: False
                SAN Certificate: True
                Namespaces:
                        autodiscover.exoip.com
                        mail.exoip.com
        Certificate:
                FriendlyName: WMSVC-SHA2
                Thumbprint: A520A23C9032B0D2B62BA812F2DBF91BB580D228
                Lifetime in days: 3555
                Key size: 2048
                Bound to services: None
                Current Auth Certificate: False
                SAN Certificate: False
                Namespaces:
                        WMSvc-SHA2-EX01-2016
        Valid Auth Certificate Found On Server: True
        SMB1 Installed: True
        SMB1 Blocked: False
                SMB1 should be uninstalled SMB1 should be blocked
                More Information: https://techcommunity.microsoft.com/t5/exchange-team-blog/exchange-server-and-smbv1/ba-p/1165615
        Security Vulnerability: CVE-2020-16875
                See: https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/CVE-2020-16875 for more information.
        Security Vulnerability: CVE-2020-16969
                See: https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/CVE-2020-16969 for more information.
        Security Vulnerability: CVE-2020-17083
                See: https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/CVE-2020-17083 for more information.
        Security Vulnerability: CVE-2020-17084
                See: https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/CVE-2020-17084 for more information.
        Security Vulnerability: CVE-2020-17085
                See: https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/CVE-2020-17085 for more information.
        Security Vulnerability: CVE-2020-17117
                See: https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/CVE-2020-17117 for more information.
        Security Vulnerability: CVE-2020-17132
                See: https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/CVE-2020-17132 for more information.
        Security Vulnerability: CVE-2020-17141
                See: https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/CVE-2020-17141 for more information.
        Security Vulnerability: CVE-2020-17142
                See: https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/CVE-2020-17142 for more information.
        Security Vulnerability: CVE-2020-17143
                See: https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/CVE-2020-17143 for more information.
        Security Vulnerability: CVE-2020-1147
                See: https://portal.msrc.microsoft.com/en-us/security-guidance/advisory/CVE-2020-1147 for more information.

Exchange Web App Pools
----------------------
        Web App Pool: GC Server Mode Enabled | Status
        MSExchangeServicesAppPool: False | Started
        MSExchangeMapiFrontEndAppPool: False | Started
        MSExchangeOWAAppPool: False | Started
        MSExchangeRestAppPool: False | Started
        MSExchangeMapiAddressBookAppPool: False | Started
        MSExchangeRpcProxyFrontEndAppPool: False | Started
        MSExchangePowerShellAppPool: False | Started
        MSExchangePowerShellFrontEndAppPool: False | Started
        MSExchangeRestFrontEndAppPool: False | Started
        MSExchangeMapiMailboxAppPool: False | Started
        MSExchangeOABAppPool: False | Started
        MSExchangePushNotificationsAppPool: False | Started
        MSExchangeOWACalendarAppPool: False | Started
        MSExchangeAutodiscoverAppPool: False | Started
        MSExchangeECPAppPool: False | Started
        MSExchangeSyncAppPool: True | Started
        MSExchangeRpcProxyAppPool: False | Started

Output file written to .\HealthCheck-EX01-2016-20201227132103.txt
Exported Data Object Written to .\HealthCheck-EX01-2016-20201227132103.xml

Exchange HealthChecker.ps1 komut dosyası iki ayrı dosya oluşturur. Bu dosyalar, komut dosyasının aynı dizininde oluşturulur. Bu örneğimizde, C:\scripts klasörüdür.

  • 1x TXT dosyası: Txt dosyası, PowerShell’deki çıktıyla aynıdır. Ancak, bir e-postaya eklemek veya bir klasöre yerleştirmek istiyorsanız kullanışlıdır.
  • 1x XML dosyası: XML dosyasını daha iyi görüntülemek için, rapor oluşturmak üzere başka bir komut çalıştırmanız gerekir.

Exchange Server sistem durumu için rapor oluşturma. C:\Scripts klasörü içerisine rapor oluşturur.

.\HealthChecker.ps1 -BuildHtmlServersReport -HtmlReportFile "EX01-2016Report.html"

Rapor sırasında bazı maddeler, aşağıdaki renkler ile işaretlenmiş durumdadır.

  • Gri: Bilgilendirici öğeler
  • Yeşil: Önerilerle ayarlar, bulunmakta
  • Sarı: Bakabileceğiniz bir uyarı veren ayarlar
  • Kırmızı: Performans sorunlarına neden olabilecek ayarlar

Dikkat etmeniz gereken en önemli olanlar kırmızı olanlardır. Lütfen raporu dikkatli inceleyiniz.

Ortamınızda bulunan başka bir Exchange Server için rapor almak isterseniz, kullanmanız gereken komut aşağıdaki gibidir;

.\HealthChecker.ps1 -Server "Server Name"

Bütün sunucularınızın raporlarını .xml olarak aldınız ve bir klasörde topladınız mı? O zaman bütün .xml raporlarını .html olarak düzenleyebilir ve detaylı bir inceleme yapabilirsiniz.

.\HealthChecker.ps1 -BuildHtmlServersReport

Ortamınızda bulunan tüm exchange sunucuları için tek bir .html raporu alabilirsiniz.

Get-ExchangeServer | ?{$_.AdminDisplayVersion -Match "^Version 15"} | %{.\HealthChecker.ps1 -Server $_.Name}; .\HealthChecker.ps1 -BuildHtmlServersReport; .\ExchangeAllServersReport.html

Kullanabileceğiniz diğer parametreler ise aşağıdaki gibidir;

Parametre

ParametreAçıklama
SunucuSistem Durumu Denetleyicisi komut dosyasını çalıştırmak istediğiniz sunucu. Parametre -BuildHTMLServersReport veya LoadBalancingReport ile geçerli değil. Varsayılan değer localhost’tur.
OutputFilePathKomut dosyasının ürettiği günlük dosyalarının çıktı konumu. Varsayılan değer geçerli dizindir.
Posta Kutusu RaporuSağlanan sunucu için Posta Kutusu Raporu’nu üretir.
LoadBalancingReportKomut dosyası için yük dengeleme raporunu çalıştırır
CasServerListesiKomut dosyasının hangi sunuculara karşı çalışacağını bilmesini sağlamak için LoadBalancingReport anahtarıyla birlikte kullanılır.
SiteAdıKomut dosyasının sitede hangi sunuculara karşı çalışacağını bilmesini sağlamak için LoadBalancingReport anahtarıyla birlikte kullanılır.
XMLDirectoryPathRapora dahil edilmesini istediğiniz sunucuların HealthChecker XML dosyalarının konumu için BuildHtmlServersReport anahtarıyla birlikte kullanılır. Varsayılan konum geçerli dizindir.
BuildHtmlServersReportTüm sunucular için HTML raporu oluşturmak üzere komut dosyasını etkinleştirmek için geçiş yapın XML sonuçları XMLDirectoryPath konumunda.
HtmlReportFileBuildHtmlServersReport’tan HTML çıktı dosyasının adı. Varsayılan değer ExchangeAllServersReport’tur.html
DCCoreRatioExchange – DC/GC Çekirdek oranını toplar ve sonuçları komut dosyasının çalıştığı geçerli sitede görüntüler.
AnalyzeDataOnlyVarolan HealthChecker XML dosyalarını çözümlemek için geçiş yapın. Sonuçlar ekranda görüntülenir ve bir HTML raporu oluşturulur.
SkipVersionCheckBu anahtar kullanıldığında sürüm denetimi yapılmaz.
KaydetDebugLogHata ayıklama günlüğü, komut dosyası başarıyla yürütülse bile tutulur.
ScriptUpdateOnlyKomut dosyasının en son sürümünü denetlemek için geçiş yapın ve daha yeni bir sürüm bulunursa otomatik güncelleştirme gerçekleştirin. İnternet bağlantısı olan herhangi bir makinede çalıştırılabilir. Yükseltilmiş izinler veya EMS gerekmez.

Cengiz YILMAZ

5 Yıldır IT Sektörü içerisindeyim, Microsoft ürünleri ile ilgilenmekteyim. Cengiz YILMAZ | MCT |

Bir cevap yazın

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir

Başa dön tuşu