{"id":381,"title":"\u00a0File Server Performance Test Tool v2.0","content":"<p>&nbsp;File Server Performance Test Tool v2.0 - Advanced Edition<\/p>\n<p>&nbsp;Yeni &Ouml;zellikler<\/p>\n<p>&nbsp;\u2699\ufe0f Ayarlar Sayfas\u0131<br>- Test parametrelerini kaydetme (Sunucu IP, Share Path)<br>- Ayarlar JSON dosyas\u0131nda saklan\u0131r: `C:\\PerformanceTests\\config.json`<\/p>\n<p>&nbsp;\ud83d\udce7 Email G&ouml;nderimi<br>- Test sonu&ccedil;lar\u0131n\u0131 otomatik email ile g&ouml;nderme<br>- SMTP ayarlar\u0131:<br>&nbsp; - SMTP Server ve Port<br>&nbsp; - Kullan\u0131c\u0131 ad\u0131 ve \u015fifre<br>&nbsp; - G&ouml;nderen ve al\u0131c\u0131 email adresleri<br>&nbsp; - SSL deste\u011fi<\/p>\n<p>&nbsp;\u23f0 Otomatik G&ouml;rev Zamanlay\u0131c\u0131<br>- Testleri belirli aral\u0131klarla otomatik &ccedil;al\u0131\u015ft\u0131rma<br>- Windows Task Scheduler entegrasyonu<br>- 5-1440 dakika aras\u0131 ayarlanabilir interval<br>- Otomatik &ccedil;al\u0131\u015fan testler email ile raporlan\u0131r<\/p>\n<p>&nbsp;\ud83d\udcca Geli\u015fmi\u015f Log Sistemi<br>- Her test i&ccedil;in ayr\u0131 log dosyas\u0131<br>- UTF-8 BOM encoding (T&uuml;rk&ccedil;e karakter deste\u011fi)<br>- Dosya ad\u0131 format\u0131: `YYYYMMDD_HHMMSS_TestAdi.txt`<\/p>\n<p>&nbsp;Kullan\u0131m<\/p>\n<p>&nbsp;Manuel &Ccedil;al\u0131\u015ft\u0131rma<br>```powershell<br>&nbsp;PowerShell'i Administrator olarak a&ccedil;\u0131n<br>.\\FileServerTest-GUI-Advanced.ps1<br>```<\/p>\n<p>&nbsp;Otomatik &Ccedil;al\u0131\u015ft\u0131rma (Zamanlay\u0131c\u0131 i&ccedil;in)<br>```powershell<br>.\\FileServerTest-GUI-Advanced.ps1 -AutoRun<br>```<\/p>\n<p>&nbsp;Ayarlar<\/p>\n<p>&nbsp;Test Parametreleri<br>- **Sunucu IP**: Ping testi i&ccedil;in hedef IP veya hostname<br>- **Share Path**: SMB, Bandwidth ve IOPS testleri i&ccedil;in UNC path (&ouml;rn: `\\\\192.168.1.100\\share`)<\/p>\n<p>&nbsp;Email Ayarlar\u0131<br>- **Email G&ouml;nderimi Aktif**: Email g&ouml;nderimini etkinle\u015ftir\/devre d\u0131\u015f\u0131 b\u0131rak<br>- **SMTP Server**: SMTP sunucu adresi (&ouml;rn: `smtp.gmail.com`)<br>- **Port**: SMTP port (genellikle 587 veya 465)<br>- **Kullan\u0131c\u0131 Ad\u0131**: SMTP kimlik do\u011frulama kullan\u0131c\u0131 ad\u0131<br>- **\u015eifre**: SMTP kimlik do\u011frulama \u015fifresi<br>- **G&ouml;nderen Email**: G&ouml;nderen email adresi<br>- **Al\u0131c\u0131 Email**: Al\u0131c\u0131 email adresi (virg&uuml;lle ay\u0131rarak birden fazla eklenebilir)<br>- **SSL Kullan**: SSL\/TLS \u015fifreleme kullan<\/p>\n<p>&nbsp;Gmail i&ccedil;in &Ouml;rnek Ayarlar<br>```<br>SMTP Server: smtp.gmail.com<br>Port: 587<br>SSL: Aktif<br>Kullan\u0131c\u0131 Ad\u0131: your-email@gmail.com<br>\u015eifre: uygulama-sifresi (2FA aktifse App Password kullan\u0131n)<br>```<\/p>\n<p>&nbsp;Office 365 i&ccedil;in &Ouml;rnek Ayarlar<br>```<br>SMTP Server: smtp.office365.com<br>Port: 587<br>SSL: Aktif<br>Kullan\u0131c\u0131 Ad\u0131: your-email@company.com<br>\u015eifre: hesap-sifresi<br>```<\/p>\n<p>&nbsp;Otomatik G&ouml;rev Zamanlay\u0131c\u0131<br>- **Otomatik Test Aktif**: Zamanlay\u0131c\u0131y\u0131 etkinle\u015ftir\/devre d\u0131\u015f\u0131 b\u0131rak<br>- **Test Aral\u0131\u011f\u0131**: Testlerin &ccedil;al\u0131\u015fma s\u0131kl\u0131\u011f\u0131 (dakika cinsinden)<br>&nbsp; - Minimum: 5 dakika<br>&nbsp; - Maksimum: 1440 dakika (24 saat)<br>&nbsp; - &Ouml;nerilen: 60 dakika<\/p>\n<p>&nbsp;&Ouml;zellikler<\/p>\n<p>&nbsp;Testler<br>1. **A\u011f Gecikme Testi**: 100 ping paketi ile latency &ouml;l&ccedil;&uuml;m&uuml;<br>2. **Bant Geni\u015fli\u011fi Testi**: 100MB dosya kopyalama ile throughput &ouml;l&ccedil;&uuml;m&uuml;<br>3. **SMB H\u0131z Testi**: K&uuml;&ccedil;&uuml;k, orta ve b&uuml;y&uuml;k dosyalarla SMB performans testi<br>4. **IOPS Testi**: Random read\/write IOPS &ouml;l&ccedil;&uuml;m&uuml;<br>5. **Sistem Bilgileri**: CPU, RAM, Disk ve Network bilgileri<\/p>\n<p>&nbsp;Raporlama<br>- Her test i&ccedil;in ayr\u0131 log dosyas\u0131<br>- Renkli konsol &ccedil;\u0131kt\u0131s\u0131<br>- UTF-8 encoding ile T&uuml;rk&ccedil;e karakter deste\u011fi<br>- Otomatik email g&ouml;nderimi<br>- Notepad ile rapor g&ouml;r&uuml;nt&uuml;leme<\/p>\n<p>&nbsp;Dosya Yap\u0131s\u0131<\/p>\n<p>```<br>C:\\PerformanceTests\\<br>\u251c\u2500\u2500 config.json &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Ayarlar dosyas\u0131<br>\u251c\u2500\u2500 20260113_120530_AgGecikme.txt &nbsp; &nbsp; &nbsp; &nbsp;A\u011f gecikme test raporu<br>\u251c\u2500\u2500 20260113_120645_BantGenisligi.txt &nbsp; &nbsp;Bant geni\u015fli\u011fi test raporu<br>\u251c\u2500\u2500 20260113_120820_SMBTest.txt &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;SMB test raporu<br>\u251c\u2500\u2500 20260113_121015_IOPSTest.txt &nbsp; &nbsp; &nbsp; &nbsp; IOPS test raporu<br>\u251c\u2500\u2500 20260113_121200_SistemBilgileri.txt &nbsp;Sistem bilgileri raporu<br>\u2514\u2500\u2500 20260113_121500_TumTestler.txt &nbsp; &nbsp; &nbsp; T&uuml;m testler raporu<br>```<\/p>\n<p>&nbsp;Gereksinimler<\/p>\n<p>- Windows Server 2019 veya &uuml;zeri<br>- PowerShell 5.1 veya &uuml;zeri<br>- Administrator yetkileri<br>- .NET Framework 4.5 veya &uuml;zeri<\/p>\n<p>&nbsp;Sorun Giderme<\/p>\n<p>&nbsp;Email G&ouml;nderilmiyor<br>- SMTP ayarlar\u0131n\u0131 kontrol edin<br>- Firewall'da SMTP portunu a&ccedil;\u0131n<br>- Gmail kullan\u0131yorsan\u0131z \"Daha az g&uuml;venli uygulamalara izin ver\" veya App Password kullan\u0131n<br>- Office 365 kullan\u0131yorsan\u0131z SMTP Auth'un etkin oldu\u011fundan emin olun<\/p>\n<p>&nbsp;Zamanlay\u0131c\u0131 &Ccedil;al\u0131\u015fm\u0131yor<br>- Script'i Administrator olarak &ccedil;al\u0131\u015ft\u0131rd\u0131\u011f\u0131n\u0131zdan emin olun<br>- Task Scheduler'da \"FileServerPerformanceTest\" g&ouml;revini kontrol edin<br>- G&ouml;rev &ouml;zelliklerinde \"Run with highest privileges\" se&ccedil;ene\u011finin aktif oldu\u011fundan emin olun<\/p>\n<p>&nbsp;T&uuml;rk&ccedil;e Karakterler Bozuk<br>- Log dosyalar\u0131n\u0131 UTF-8 destekleyen bir edit&ouml;rle a&ccedil;\u0131n (Notepad++, VS Code)<br>- Windows Notepad kullan\u0131yorsan\u0131z \"Encoding\" men&uuml;s&uuml;nden \"UTF-8\" se&ccedil;in<\/p>\n<p>&nbsp;Lisans<\/p>\n<p>Bu ara&ccedil; &Ouml;nder Ak&ouml;z taraf\u0131ndan Windows Server 2016\/2019\/2022 i&ccedil;in geli\u015ftirilmi\u015ftir.<\/p>\n<p>&nbsp;Versiyon Ge&ccedil;mi\u015fi<\/p>\n<p>&nbsp;v2.0 (2026-01-13)<br>- Ayarlar sayfas\u0131 eklendi<br>- Email g&ouml;nderimi eklendi<br>- Otomatik g&ouml;rev zamanlay\u0131c\u0131 eklendi<br>- JSON tabanl\u0131 konfig&uuml;rasyon sistemi<br>- Her test i&ccedil;in ayr\u0131 log dosyas\u0131<\/p>\n<p>&nbsp;v1.0 (2026-01-13)<br>- \u0130lk s&uuml;r&uuml;m<br>- Temel test fonksiyonlar\u0131<br>- GUI aray&uuml;z&uuml;<\/p>\n<pre class=\"language-markup\"><code># File Server Performance Test Tool - Advanced GUI Version\n# Windows Server 2019 compatible\n# Run as Administrator\n\n# Check for AutoRun parameter\nparam([switch]$AutoRun)\n\nAdd-Type -AssemblyName System.Windows.Forms\nAdd-Type -AssemblyName System.Drawing\n\n# Global variables\n$script:OutputPath = \"C:\\PerformanceTests\"\n$script:ConfigFile = Join-Path $script:OutputPath \"config.json\"\n$script:reportFile = \"\"\n$script:isRunning = $false\n$script:config = $null\n\n# Create output folder\nif (-not (Test-Path $script:OutputPath)) {\n    New-Item -ItemType Directory -Path $script:OutputPath -Force | Out-Null\n}\n\n#region Configuration Management\nfunction Load-Config {\n    if (Test-Path $script:ConfigFile) {\n        try {\n            $json = Get-Content -Path $script:ConfigFile -Raw -Encoding UTF8\n            $script:config = $json | ConvertFrom-Json\n        } catch {\n            $script:config = Get-DefaultConfig\n        }\n    } else {\n        $script:config = Get-DefaultConfig\n    }\n}\n\nfunction Get-DefaultConfig {\n    return [PSCustomObject]@{\n        ServerIP = \"\"\n        SharePath = \"\"\n        OutputPath = \"C:\\PerformanceTests\"\n        EmailEnabled = $false\n        SMTPServer = \"\"\n        SMTPPort = 587\n        SMTPUsername = \"\"\n        SMTPPassword = \"\"\n        SMTPFrom = \"\"\n        SMTPTo = \"\"\n        SMTPUseSSL = $true\n        ScheduleEnabled = $false\n        ScheduleInterval = 60\n        ScheduleTests = @(\"Network\", \"Bandwidth\", \"SMB\", \"IOPS\")\n    }\n}\n\nfunction Save-Config {\n    try {\n        $utf8BOM = New-Object System.Text.UTF8Encoding $true\n        $json = $script:config | ConvertTo-Json -Depth 10\n        [System.IO.File]::WriteAllText($script:ConfigFile, $json, $utf8BOM)\n        return $true\n    } catch {\n        [System.Windows.Forms.MessageBox]::Show(\"Ayarlar kaydedilemedi: $($_.Exception.Message)\", \"Hata\", [System.Windows.Forms.MessageBoxButtons]::OK, [System.Windows.Forms.MessageBoxIcon]::Error)\n        return $false\n    }\n}\n#endregion\n\n#region Email Functions\nfunction Send-EmailReport {\n    param([string]$ReportFile)\n    \n    if (-not $script:config.EmailEnabled) {\n        return\n    }\n    \n    if ([string]::IsNullOrEmpty($script:config.SMTPServer) -or [string]::IsNullOrEmpty($script:config.SMTPTo)) {\n        Write-Log \"[WARN] Email ayarlar\u0131 eksik, email g&ouml;nderilemedi!\" \"Yellow\"\n        return\n    }\n    \n    try {\n        Write-Log \"Email g&ouml;nderiliyor...\" \"Yellow\"\n        \n        $reportContent = Get-Content -Path $ReportFile -Raw -Encoding UTF8\n        \n        $mailParams = @{\n            SmtpServer = $script:config.SMTPServer\n            Port = $script:config.SMTPPort\n            From = $script:config.SMTPFrom\n            To = $script:config.SMTPTo\n            Subject = \"File Server Test Raporu - $(Get-Date -Format 'dd.MM.yyyy HH:mm')\"\n            Body = $reportContent\n            Encoding = [System.Text.Encoding]::UTF8\n            UseSsl = $script:config.SMTPUseSSL\n        }\n        \n        if (-not [string]::IsNullOrEmpty($script:config.SMTPUsername)) {\n            $securePassword = ConvertTo-SecureString $script:config.SMTPPassword -AsPlainText -Force\n            $credential = New-Object System.Management.Automation.PSCredential($script:config.SMTPUsername, $securePassword)\n            $mailParams.Credential = $credential\n        }\n        \n        Send-MailMessage @mailParams\n        Write-Log \"[OK] Email ba\u015far\u0131yla g&ouml;nderildi!\" \"Green\"\n        \n    } catch {\n        Write-Log \"[ERROR] Email g&ouml;nderilemedi: $($_.Exception.Message)\" \"Red\"\n    }\n}\n#endregion\n\n#region Scheduler Functions\nfunction Register-ScheduledTask {\n    param([int]$IntervalMinutes)\n    \n    try {\n        $taskName = \"FileServerPerformanceTest\"\n        $scriptPath = $PSCommandPath\n        \n        # Mevcut g&ouml;revi sil\n        Unregister-ScheduledTask -TaskName $taskName -Confirm:$false -ErrorAction SilentlyContinue\n        \n        # Yeni g&ouml;rev olu\u015ftur\n        $action = New-ScheduledTaskAction -Execute \"PowerShell.exe\" -Argument \"-NoProfile -ExecutionPolicy Bypass -File `\"$scriptPath`\" -AutoRun\"\n        $trigger = New-ScheduledTaskTrigger -Once -At (Get-Date) -RepetitionInterval (New-TimeSpan -Minutes $IntervalMinutes) -RepetitionDuration ([TimeSpan]::MaxValue)\n        $principal = New-ScheduledTaskPrincipal -UserId \"$env:USERDOMAIN\\$env:USERNAME\" -LogonType Interactive -RunLevel Highest\n        $settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -StartWhenAvailable\n        \n        Register-ScheduledTask -TaskName $taskName -Action $action -Trigger $trigger -Principal $principal -Settings $settings -Force | Out-Null\n        \n        Write-Log \"[OK] Zamanlanm\u0131\u015f g&ouml;rev olu\u015fturuldu (Her $IntervalMinutes dakikada)\" \"Green\"\n        return $true\n        \n    } catch {\n        Write-Log \"[ERROR] Zamanlanm\u0131\u015f g&ouml;rev olu\u015fturulamad\u0131: $($_.Exception.Message)\" \"Red\"\n        return $false\n    }\n}\n\nfunction Unregister-ScheduledTask {\n    try {\n        $taskName = \"FileServerPerformanceTest\"\n        Unregister-ScheduledTask -TaskName $taskName -Confirm:$false -ErrorAction SilentlyContinue\n        Write-Log \"[OK] Zamanlanm\u0131\u015f g&ouml;rev kald\u0131r\u0131ld\u0131\" \"Green\"\n        return $true\n    } catch {\n        Write-Log \"[ERROR] Zamanlanm\u0131\u015f g&ouml;rev kald\u0131r\u0131lamad\u0131: $($_.Exception.Message)\" \"Red\"\n        return $false\n    }\n}\n#endregion\n\n#region Helper Functions\nfunction Write-Log {\n    param([string]$Message, [string]$Color = \"Black\", [string]$TestName = \"\")\n    \n    # GUI kontrol&uuml; - e\u011fer form yoksa sadece console'a yaz\n    if ($null -eq $textBox) {\n        Write-Host $Message\n        return\n    }\n    \n    $textBox.SelectionStart = $textBox.TextLength\n    $textBox.SelectionLength = 0\n    \n    switch ($Color) {\n        \"Green\" { $textBox.SelectionColor = [System.Drawing.Color]::Green }\n        \"Red\" { $textBox.SelectionColor = [System.Drawing.Color]::Red }\n        \"Yellow\" { $textBox.SelectionColor = [System.Drawing.Color]::DarkOrange }\n        \"Cyan\" { $textBox.SelectionColor = [System.Drawing.Color]::DarkCyan }\n        default { $textBox.SelectionColor = [System.Drawing.Color]::Black }\n    }\n    \n    $textBox.AppendText(\"$Message`r`n\")\n    $textBox.ScrollToCaret()\n    $form.Refresh()\n    \n    # Her test i&ccedil;in ayr\u0131 dosya olu\u015ftur\n    if (-not [string]::IsNullOrEmpty($TestName)) {\n        $timestamp = Get-Date -Format \"yyyyMMdd_HHmmss\"\n        $script:reportFile = Join-Path $script:OutputPath \"${timestamp}_${TestName}.txt\"\n        \n        # UTF-8 BOM ile dosya olu\u015ftur\n        $utf8BOM = New-Object System.Text.UTF8Encoding $true\n        $header = \"Test: $TestName`r`nTarih: $(Get-Date)`r`nSunucu: $env:COMPUTERNAME`r`n================================================================`r`n`r`n\"\n        [System.IO.File]::WriteAllText($script:reportFile, $header, $utf8BOM)\n    }\n    \n    if ($script:reportFile -and (Test-Path $script:reportFile)) {\n        # UTF-8 BOM ile append\n        $utf8BOM = New-Object System.Text.UTF8Encoding $true\n        $currentContent = [System.IO.File]::ReadAllText($script:reportFile, $utf8BOM)\n        $newContent = $currentContent + $Message + \"`r`n\"\n        [System.IO.File]::WriteAllText($script:reportFile, $newContent, $utf8BOM)\n    }\n}\n\nfunction Enable-Controls {\n    $btnNetworkTest.Enabled = $true\n    $btnBandwidthTest.Enabled = $true\n    $btnSMBTest.Enabled = $true\n    $btnIOPSTest.Enabled = $true\n    $btnFullTest.Enabled = $true\n    $btnSystemInfo.Enabled = $true\n    $btnClearLog.Enabled = $true\n    $btnSaveReport.Enabled = $true\n    $btnSettings.Enabled = $true\n    $script:isRunning = $false\n}\n\nfunction Disable-Controls {\n    $btnNetworkTest.Enabled = $false\n    $btnBandwidthTest.Enabled = $false\n    $btnSMBTest.Enabled = $false\n    $btnIOPSTest.Enabled = $false\n    $btnFullTest.Enabled = $false\n    $btnSystemInfo.Enabled = $false\n    $btnClearLog.Enabled = $false\n    $btnSaveReport.Enabled = $false\n    $btnSettings.Enabled = $false\n    $script:isRunning = $true\n}\n#endregion\n\n#region Test Functions\nfunction Test-NetworkLatency {\n    $target = if ([string]::IsNullOrEmpty($txtServerIP.Text)) { $script:config.ServerIP } else { $txtServerIP.Text.Trim() }\n    \n    if ([string]::IsNullOrEmpty($target)) {\n        [System.Windows.Forms.MessageBox]::Show(\"L&uuml;tfen Sunucu IP adresi giriniz!\", \"Uyar\u0131\", [System.Windows.Forms.MessageBoxButtons]::OK, [System.Windows.Forms.MessageBoxIcon]::Warning)\n        return\n    }\n    \n    # IP adresi veya hostname validasyonu\n    $ipPattern = \"^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$\"\n    $hostnamePattern = \"^[a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?(\\.[a-zA-Z0-9]([a-zA-Z0-9\\-]{0,61}[a-zA-Z0-9])?)*$\"\n    \n    if (-not ($target -match $ipPattern -or $target -match $hostnamePattern)) {\n        [System.Windows.Forms.MessageBox]::Show(\"Ge&ccedil;ersiz IP adresi veya hostname!`n`n&Ouml;rnekler:`n- 192.168.1.1`n- server.domain.com`n- fileserver\", \"Hata\", [System.Windows.Forms.MessageBoxButtons]::OK, [System.Windows.Forms.MessageBoxIcon]::Error)\n        return\n    }\n    \n    Write-Log \"\" \"\" \"AgGecikme\"\n    Write-Log \"`n================================================================\" \"Cyan\"\n    Write-Log \"1. A\u011e GEC\u0130KME TEST\u0130 (Network Latency)\" \"Cyan\"\n    Write-Log \"================================================================\" \"Cyan\"\n    Write-Log \"Ping testi yap\u0131l\u0131yor ($target)...\" \"Yellow\"\n    \n    $pingResults = Test-Connection -ComputerName $target -Count 100 -ErrorAction SilentlyContinue\n    \n    if ($pingResults) {\n        $avgLatency = ($pingResults | Measure-Object -Property ResponseTime -Average).Average\n        $minLatency = ($pingResults | Measure-Object -Property ResponseTime -Minimum).Minimum\n        $maxLatency = ($pingResults | Measure-Object -Property ResponseTime -Maximum).Maximum\n        $successCount = ($pingResults | Where-Object {$_.StatusCode -eq 0}).Count\n        $lossPercent = ((100 - $successCount) \/ 100) * 100\n        \n        Write-Log \"`nPING SONU&Ccedil;LARI:\"\n        Write-Log \"--------------\"\n        Write-Log \"Hedef: $target\"\n        Write-Log \"Paket G&ouml;nderilen: 100\"\n        Write-Log \"Ba\u015far\u0131l\u0131: $successCount\"\n        Write-Log \"Kay\u0131p: $lossPercent%\"\n        Write-Log \"Ortalama Gecikme: $([math]::Round($avgLatency, 2)) ms\"\n        Write-Log \"Minimum Gecikme: $minLatency ms\"\n        Write-Log \"Maksimum Gecikme: $maxLatency ms\"\n        Write-Log \"`nDE\u011eERLEND\u0130RME:\"\n        \n        if ($avgLatency -lt 20) {\n            Write-Log \"[OK] M&Uuml;KEMMEL: Gecikme &ccedil;ok d&uuml;\u015f&uuml;k (&lt;20ms)\" \"Green\"\n        } elseif ($avgLatency -lt 50) {\n            Write-Log \"[OK] \u0130Y\u0130: Gecikme kabul edilebilir seviyede (&lt;50ms)\" \"Green\"\n        } elseif ($avgLatency -lt 100) {\n            Write-Log \"[WARN] ORTA: Gecikme biraz y&uuml;ksek (50-100ms)\" \"Yellow\"\n        } else {\n            Write-Log \"[ERROR] K&Ouml;T&Uuml;: Y&uuml;ksek gecikme tespit edildi (&gt;100ms)\" \"Red\"\n        }\n        \n        if ($lossPercent -gt 1) {\n            Write-Log \"[ERROR] UYARI: Paket kayb\u0131 tespit edildi! (%$lossPercent)\" \"Red\"\n        }\n        \n    } else {\n        Write-Log \"[ERROR] Ping testi ba\u015far\u0131s\u0131z! Hedef sunucuya eri\u015filemiyor.\" \"Red\"\n    }\n}\n\nfunction Test-Bandwidth {\n    $target = if ([string]::IsNullOrEmpty($txtSharePath.Text)) { $script:config.SharePath } else { $txtSharePath.Text.Trim() }\n    \n    if ([string]::IsNullOrEmpty($target)) {\n        [System.Windows.Forms.MessageBox]::Show(\"L&uuml;tfen Share Path giriniz!`n`n&Ouml;rnek: \\\\192.168.1.100\\share\", \"Uyar\u0131\", [System.Windows.Forms.MessageBoxButtons]::OK, [System.Windows.Forms.MessageBoxIcon]::Warning)\n        return\n    }\n    \n    if (-not $target.StartsWith(\"\\\\\")) {\n        [System.Windows.Forms.MessageBox]::Show(\"Share Path UNC format\u0131nda olmal\u0131d\u0131r!`n`n&Ouml;rnek: \\\\192.168.1.100\\share\", \"Hata\", [System.Windows.Forms.MessageBoxButtons]::OK, [System.Windows.Forms.MessageBoxIcon]::Error)\n        return\n    }\n    \n    Write-Log \"\" \"\" \"BantGenisligi\"\n    Write-Log \"`n================================================================\" \"Cyan\"\n    Write-Log \"2. BANT GEN\u0130\u015eL\u0130\u011e\u0130 TEST\u0130 (Bandwidth)\" \"Cyan\"\n    Write-Log \"================================================================\" \"Cyan\"\n    \n    $testFile = Join-Path $script:OutputPath \"bandwidth_test_100MB.tmp\"\n    $testSize = 100MB\n    \n    Write-Log \"Test dosyas\u0131 olu\u015fturuluyor (100MB)...\" \"Yellow\"\n    $random = New-Object byte[] $testSize\n    (New-Object Random).NextBytes($random)\n    [System.IO.File]::WriteAllBytes($testFile, $random)\n    \n    Write-Log \"Dosya kopyalama testi ba\u015flat\u0131l\u0131yor...\" \"Yellow\"\n    \n    $startTime = Get-Date\n    try {\n        $destFile = Join-Path $target \"bandwidth_test_100MB.tmp\"\n        Copy-Item -Path $testFile -Destination $destFile -Force\n        $endTime = Get-Date\n        $duration = ($endTime - $startTime).TotalSeconds\n        $speedMBps = ($testSize \/ 1MB) \/ $duration\n        $speedMbps = $speedMBps * 8\n        \n        Write-Log \"`nBANT GEN\u0130\u015eL\u0130\u011e\u0130 TEST SONU&Ccedil;LARI:\"\n        Write-Log \"-----------------------------\"\n        Write-Log \"Test Dosya Boyutu: 100 MB\"\n        Write-Log \"S&uuml;re: $([math]::Round($duration, 2)) saniye\"\n        Write-Log \"Ortalama H\u0131z: $([math]::Round($speedMBps, 2)) MB\/s ($([math]::Round($speedMbps, 2)) Mbps)\"\n        Write-Log \"`nDE\u011eERLEND\u0130RME:\"\n        \n        if ($speedMbps -gt 800) {\n            Write-Log \"[OK] M&Uuml;KEMMEL: Gigabit h\u0131za yak\u0131n performans\" \"Green\"\n        } elseif ($speedMbps -gt 400) {\n            Write-Log \"[OK] \u0130Y\u0130: MPLS 500Mbps hatt\u0131 verimli kullan\u0131l\u0131yor\" \"Green\"\n        } elseif ($speedMbps -gt 80) {\n            Write-Log \"[WARN] ORTA: MPLS 100Mbps hatt\u0131 kullan\u0131l\u0131yor\" \"Yellow\"\n        } else {\n            Write-Log \"[ERROR] D&Uuml;\u015e&Uuml;K: Bant geni\u015fli\u011fi beklenenin alt\u0131nda\" \"Red\"\n        }\n        \n        Remove-Item -Path $destFile -Force -ErrorAction SilentlyContinue\n        \n    } catch {\n        Write-Log \"[ERROR] Kopyalama hatas\u0131: $($_.Exception.Message)\" \"Red\"\n    }\n    \n    Remove-Item -Path $testFile -Force -ErrorAction SilentlyContinue\n}\n\nfunction Test-SMBPerformance {\n    $sharePath = if ([string]::IsNullOrEmpty($txtSharePath.Text)) { $script:config.SharePath } else { $txtSharePath.Text.Trim() }\n    \n    if ([string]::IsNullOrEmpty($sharePath)) {\n        [System.Windows.Forms.MessageBox]::Show(\"L&uuml;tfen Share Path giriniz!\", \"Uyar\u0131\", [System.Windows.Forms.MessageBoxButtons]::OK, [System.Windows.Forms.MessageBoxIcon]::Warning)\n        return\n    }\n    \n    Write-Log \"\" \"\" \"SMBTest\"\n    Write-Log \"`n================================================================\" \"Cyan\"\n    Write-Log \"3. SMB BA\u011eLANTI HIZ TEST\u0130\" \"Cyan\"\n    Write-Log \"================================================================\" \"Cyan\"\n    \n    $testFolder = Join-Path $script:OutputPath \"SMBTest\"\n    if (-not (Test-Path $testFolder)) {\n        New-Item -ItemType Directory -Path $testFolder -Force | Out-Null\n    }\n    \n    $testSizes = @{\n        \"Small\" = 1MB\n        \"Medium\" = 10MB\n        \"Large\" = 50MB\n    }\n    \n    $results = @{}\n    \n    foreach ($sizeType in $testSizes.Keys) {\n        $size = $testSizes[$sizeType]\n        $count = if ($sizeType -eq \"Small\") { 100 } elseif ($sizeType -eq \"Medium\") { 10 } else { 5 }\n        \n        Write-Log \"`n$sizeType dosyalar test ediliyor ($count adet x $($size\/1MB)MB)...\" \"Yellow\"\n        \n        $files = @()\n        for ($i = 1; $i -le $count; $i++) {\n            $fileName = \"test_${sizeType}_$i.tmp\"\n            $filePath = Join-Path $testFolder $fileName\n            $random = New-Object byte[] $size\n            (New-Object Random).NextBytes($random)\n            [System.IO.File]::WriteAllBytes($filePath, $random)\n            $files += $filePath\n        }\n        \n        $startTime = Get-Date\n        try {\n            foreach ($file in $files) {\n                Copy-Item -Path $file -Destination $sharePath -Force\n            }\n            $endTime = Get-Date\n            $duration = ($endTime - $startTime).TotalSeconds\n            $totalSizeMB = ($size * $count) \/ 1MB\n            $speedMBps = $totalSizeMB \/ $duration\n            \n            $results[$sizeType] = @{\n                Count = $count\n                TotalSize = $totalSizeMB\n                Duration = $duration\n                Speed = $speedMBps\n            }\n            \n            Write-Log \"  [OK] Tamamland\u0131: $([math]::Round($speedMBps, 2)) MB\/s\" \"Green\"\n            \n            foreach ($file in $files) {\n                $fileName = Split-Path $file -Leaf\n                Remove-Item -Path \"$sharePath\\$fileName\" -Force -ErrorAction SilentlyContinue\n            }\n            \n        } catch {\n            Write-Log \"  [ERROR] Hata: $($_.Exception.Message)\" \"Red\"\n        }\n        \n        foreach ($file in $files) {\n            Remove-Item -Path $file -Force -ErrorAction SilentlyContinue\n        }\n    }\n    \n    Write-Log \"`n`nSMB PERFORMANS TEST SONU&Ccedil;LARI:\"\n    Write-Log \"-----------------------------\"\n    Write-Log \"Share Path: $sharePath`n\"\n    \n    foreach ($sizeType in $results.Keys) {\n        $r = $results[$sizeType]\n        Write-Log \"$sizeType Dosyalar:\"\n        Write-Log \"  Dosya Say\u0131s\u0131: $($r.Count) adet\"\n        Write-Log \"  Toplam Boyut: $([math]::Round($r.TotalSize, 2)) MB\"\n        Write-Log \"  S&uuml;re: $([math]::Round($r.Duration, 2)) saniye\"\n        Write-Log \"  Ortalama H\u0131z: $([math]::Round($r.Speed, 2)) MB\/s`n\"\n    }\n    \n    if ($results.Count -gt 0) {\n        Write-Log \"DE\u011eERLEND\u0130RME:\"\n        \n        # Speed de\u011ferlerini topla\n        $speedValues = @()\n        foreach ($key in $results.Keys) {\n            if ($results[$key].Speed) {\n                $speedValues += $results[$key].Speed\n            }\n        }\n        \n        if ($speedValues.Count -gt 0) {\n            $avgSpeed = ($speedValues | Measure-Object -Average).Average\n            if ($avgSpeed -gt 50) {\n                Write-Log \"[OK] M&Uuml;KEMMEL: SMB performans\u0131 &ccedil;ok iyi\" \"Green\"\n            } elseif ($avgSpeed -gt 20) {\n                Write-Log \"[OK] \u0130Y\u0130: SMB performans\u0131 kabul edilebilir\" \"Green\"\n            } else {\n                Write-Log \"[ERROR] D&Uuml;\u015e&Uuml;K: SMB performans\u0131 optimize edilmeli\" \"Red\"\n            }\n        } else {\n            Write-Log \"[ERROR] Test tamamlanamad\u0131 - Speed de\u011ferleri al\u0131namad\u0131!\" \"Red\"\n        }\n    } else {\n        Write-Log \"[ERROR] Test tamamlanamad\u0131!\" \"Red\"\n    }\n    \n    Remove-Item -Path $testFolder -Recurse -Force -ErrorAction SilentlyContinue\n}\n\nfunction Test-IOPS {\n    $testPath = if ([string]::IsNullOrEmpty($txtSharePath.Text)) { $script:config.SharePath } else { $txtSharePath.Text.Trim() }\n    \n    if ([string]::IsNullOrEmpty($testPath)) {\n        [System.Windows.Forms.MessageBox]::Show(\"L&uuml;tfen Test Path giriniz!\", \"Uyar\u0131\", [System.Windows.Forms.MessageBoxButtons]::OK, [System.Windows.Forms.MessageBoxIcon]::Warning)\n        return\n    }\n    \n    Write-Log \"\" \"\" \"IOPSTest\"\n    Write-Log \"`n================================================================\" \"Cyan\"\n    Write-Log \"4. IOPS (Disk Performans) TEST\u0130\" \"Cyan\"\n    Write-Log \"================================================================\" \"Cyan\"\n    Write-Log \"IOPS testi yap\u0131l\u0131yor... Bu test birka&ccedil; dakika s&uuml;rebilir...\" \"Yellow\"\n    \n    $testFolder = Join-Path $testPath \"IOPSTest\"\n    if (-not (Test-Path $testFolder)) {\n        New-Item -ItemType Directory -Path $testFolder -Force | Out-Null\n    }\n    \n    $testFile = Join-Path $testFolder \"iops_test.tmp\"\n    $fileSize = 100MB\n    $blockSize = 4KB\n    \n    Write-Log \"Test dosyas\u0131 olu\u015fturuluyor...\" \"Yellow\"\n    $random = New-Object byte[] $fileSize\n    (New-Object Random).NextBytes($random)\n    [System.IO.File]::WriteAllBytes($testFile, $random)\n    \n    Write-Log \"Random Read testi...\" \"Yellow\"\n    $readOps = 0\n    $startTime = Get-Date\n    $duration = 10\n    $fileStream = [System.IO.File]::OpenRead($testFile)\n    $buffer = New-Object byte[] $blockSize\n    \n    while (((Get-Date) - $startTime).TotalSeconds -lt $duration) {\n        $pos = Get-Random -Minimum 0 -Maximum ($fileSize - $blockSize)\n        $fileStream.Seek($pos, [System.IO.SeekOrigin]::Begin) | Out-Null\n        $fileStream.Read($buffer, 0, $blockSize) | Out-Null\n        $readOps++\n    }\n    \n    $fileStream.Close()\n    $readIOPS = [math]::Round($readOps \/ $duration, 0)\n    \n    Write-Log \"Random Write testi...\" \"Yellow\"\n    $writeOps = 0\n    $startTime = Get-Date\n    $fileStream = [System.IO.File]::OpenWrite($testFile)\n    $buffer = New-Object byte[] $blockSize\n    \n    while (((Get-Date) - $startTime).TotalSeconds -lt $duration) {\n        $pos = Get-Random -Minimum 0 -Maximum ($fileSize - $blockSize)\n        $fileStream.Seek($pos, [System.IO.SeekOrigin]::Begin) | Out-Null\n        (New-Object Random).NextBytes($buffer)\n        $fileStream.Write($buffer, 0, $blockSize)\n        $writeOps++\n    }\n    \n    $fileStream.Close()\n    $writeIOPS = [math]::Round($writeOps \/ $duration, 0)\n    \n    Write-Log \"`nIOPS TEST SONU&Ccedil;LARI:\"\n    Write-Log \"-------------------\"\n    Write-Log \"Test Path: $testPath\"\n    Write-Log \"Block Size: 4KB\"\n    Write-Log \"Test S&uuml;resi: $duration saniye\"\n    Write-Log \"Random Read IOPS: $readIOPS\"\n    Write-Log \"Random Write IOPS: $writeIOPS\"\n    Write-Log \"`nDE\u011eERLEND\u0130RME:\"\n    \n    if ($readIOPS -gt 10000) {\n        Write-Log \"[OK] M&Uuml;KEMMEL: NVMe SSD performans\u0131\" \"Green\"\n    } elseif ($readIOPS -gt 3000) {\n        Write-Log \"[OK] \u0130Y\u0130: SSD performans\u0131\" \"Green\"\n    } elseif ($readIOPS -gt 500) {\n        Write-Log \"[WARN] ORTA: SATA SSD veya y&uuml;ksek performansl\u0131 HDD\" \"Yellow\"\n    } else {\n        Write-Log \"[ERROR] D&Uuml;\u015e&Uuml;K: Geleneksel HDD performans\u0131 - SSD'ye ge&ccedil;i\u015f &ouml;nerilir\" \"Red\"\n    }\n    \n    if ($writeIOPS -lt 100 -and $testPath.StartsWith(\"\\\\\")) {\n        Write-Log \"[WARN] UYARI: Network storage &uuml;zerinde d&uuml;\u015f&uuml;k write IOPS\" \"Yellow\"\n    }\n    \n    Remove-Item -Path $testFolder -Recurse -Force -ErrorAction SilentlyContinue\n}\n\nfunction Get-SystemInfo {\n    Write-Log \"\" \"\" \"SistemBilgileri\"\n    Write-Log \"`n================================================================\" \"Cyan\"\n    Write-Log \"S\u0130STEM B\u0130LG\u0130LER\u0130\" \"Cyan\"\n    Write-Log \"================================================================\" \"Cyan\"\n    \n    $cpu = Get-WmiObject Win32_Processor | Select-Object -First 1\n    $ram = Get-WmiObject Win32_ComputerSystem\n    $disk = Get-WmiObject Win32_LogicalDisk -Filter \"DeviceID='C:'\"\n    $network = Get-NetAdapter | Where-Object {$_.Status -eq \"Up\"}\n    \n    Write-Log \"`nSunucu: $env:COMPUTERNAME\" \"Cyan\"\n    Write-Log \"\u0130\u015fletim Sistemi: $((Get-WmiObject Win32_OperatingSystem).Caption)\" \"Cyan\"\n    Write-Log \"Processor: $($cpu.Name)\" \"Cyan\"\n    Write-Log \"CPU &Ccedil;ekirdek: $($cpu.NumberOfCores)\" \"Cyan\"\n    Write-Log \"RAM: $([math]::Round($ram.TotalPhysicalMemory\/1GB, 2)) GB\" \"Cyan\"\n    Write-Log \"C: Disk Bo\u015f Alan: $([math]::Round($disk.FreeSpace\/1GB, 2)) GB \/ $([math]::Round($disk.Size\/1GB, 2)) GB\" \"Cyan\"\n    Write-Log \"`nAktif Network Adapt&ouml;rleri:\" \"Cyan\"\n    \n    foreach ($adapter in $network) {\n        Write-Log \"  - $($adapter.Name): $($adapter.LinkSpeed)\" \"Cyan\"\n    }\n}\n#endregion\n\n#region Settings Form\nfunction Show-SettingsForm {\n    $settingsForm = New-Object System.Windows.Forms.Form\n    $settingsForm.Text = \"Ayarlar\"\n    $settingsForm.Size = New-Object System.Drawing.Size(600, 650)\n    $settingsForm.StartPosition = \"CenterParent\"\n    $settingsForm.FormBorderStyle = \"FixedDialog\"\n    $settingsForm.MaximizeBox = $false\n    $settingsForm.MinimizeBox = $false\n    \n    $yPos = 20\n    \n    # Test Parametreleri\n    $grpTest = New-Object System.Windows.Forms.GroupBox\n    $grpTest.Location = New-Object System.Drawing.Point(10, $yPos)\n    $grpTest.Size = New-Object System.Drawing.Size(560, 100)\n    $grpTest.Text = \"Test Parametreleri\"\n    $settingsForm.Controls.Add($grpTest)\n    \n    $lblServerIP = New-Object System.Windows.Forms.Label\n    $lblServerIP.Location = New-Object System.Drawing.Point(10, 25)\n    $lblServerIP.Size = New-Object System.Drawing.Size(120, 20)\n    $lblServerIP.Text = \"Sunucu IP:\"\n    $grpTest.Controls.Add($lblServerIP)\n    \n    $txtSettingsServerIP = New-Object System.Windows.Forms.TextBox\n    $txtSettingsServerIP.Location = New-Object System.Drawing.Point(140, 23)\n    $txtSettingsServerIP.Size = New-Object System.Drawing.Size(400, 20)\n    $txtSettingsServerIP.Text = $script:config.ServerIP\n    $grpTest.Controls.Add($txtSettingsServerIP)\n    \n    $lblSharePath = New-Object System.Windows.Forms.Label\n    $lblSharePath.Location = New-Object System.Drawing.Point(10, 55)\n    $lblSharePath.Size = New-Object System.Drawing.Size(120, 20)\n    $lblSharePath.Text = \"Share Path:\"\n    $grpTest.Controls.Add($lblSharePath)\n    \n    $txtSettingsSharePath = New-Object System.Windows.Forms.TextBox\n    $txtSettingsSharePath.Location = New-Object System.Drawing.Point(140, 53)\n    $txtSettingsSharePath.Size = New-Object System.Drawing.Size(400, 20)\n    $txtSettingsSharePath.Text = $script:config.SharePath\n    $grpTest.Controls.Add($txtSettingsSharePath)\n    \n    $yPos += 120\n    \n    # Email Ayarlar\u0131\n    $grpEmail = New-Object System.Windows.Forms.GroupBox\n    $grpEmail.Location = New-Object System.Drawing.Point(10, $yPos)\n    $grpEmail.Size = New-Object System.Drawing.Size(560, 240)\n    $grpEmail.Text = \"Email Ayarlar\u0131\"\n    $settingsForm.Controls.Add($grpEmail)\n    \n    $chkEmailEnabled = New-Object System.Windows.Forms.CheckBox\n    $chkEmailEnabled.Location = New-Object System.Drawing.Point(10, 25)\n    $chkEmailEnabled.Size = New-Object System.Drawing.Size(200, 20)\n    $chkEmailEnabled.Text = \"Email G&ouml;nderimi Aktif\"\n    $chkEmailEnabled.Checked = $script:config.EmailEnabled\n    $grpEmail.Controls.Add($chkEmailEnabled)\n    \n    $lblSMTPServer = New-Object System.Windows.Forms.Label\n    $lblSMTPServer.Location = New-Object System.Drawing.Point(10, 55)\n    $lblSMTPServer.Size = New-Object System.Drawing.Size(120, 20)\n    $lblSMTPServer.Text = \"SMTP Server:\"\n    $grpEmail.Controls.Add($lblSMTPServer)\n    \n    $txtSMTPServer = New-Object System.Windows.Forms.TextBox\n    $txtSMTPServer.Location = New-Object System.Drawing.Point(140, 53)\n    $txtSMTPServer.Size = New-Object System.Drawing.Size(300, 20)\n    $txtSMTPServer.Text = $script:config.SMTPServer\n    $grpEmail.Controls.Add($txtSMTPServer)\n    \n    $lblSMTPPort = New-Object System.Windows.Forms.Label\n    $lblSMTPPort.Location = New-Object System.Drawing.Point(450, 55)\n    $lblSMTPPort.Size = New-Object System.Drawing.Size(40, 20)\n    $lblSMTPPort.Text = \"Port:\"\n    $grpEmail.Controls.Add($lblSMTPPort)\n    \n    $txtSMTPPort = New-Object System.Windows.Forms.TextBox\n    $txtSMTPPort.Location = New-Object System.Drawing.Point(490, 53)\n    $txtSMTPPort.Size = New-Object System.Drawing.Size(50, 20)\n    $txtSMTPPort.Text = $script:config.SMTPPort\n    $grpEmail.Controls.Add($txtSMTPPort)\n    \n    $lblSMTPUsername = New-Object System.Windows.Forms.Label\n    $lblSMTPUsername.Location = New-Object System.Drawing.Point(10, 85)\n    $lblSMTPUsername.Size = New-Object System.Drawing.Size(120, 20)\n    $lblSMTPUsername.Text = \"Kullan\u0131c\u0131 Ad\u0131:\"\n    $grpEmail.Controls.Add($lblSMTPUsername)\n    \n    $txtSMTPUsername = New-Object System.Windows.Forms.TextBox\n    $txtSMTPUsername.Location = New-Object System.Drawing.Point(140, 83)\n    $txtSMTPUsername.Size = New-Object System.Drawing.Size(400, 20)\n    $txtSMTPUsername.Text = $script:config.SMTPUsername\n    $grpEmail.Controls.Add($txtSMTPUsername)\n    \n    $lblSMTPPassword = New-Object System.Windows.Forms.Label\n    $lblSMTPPassword.Location = New-Object System.Drawing.Point(10, 115)\n    $lblSMTPPassword.Size = New-Object System.Drawing.Size(120, 20)\n    $lblSMTPPassword.Text = \"\u015eifre:\"\n    $grpEmail.Controls.Add($lblSMTPPassword)\n    \n    $txtSMTPPassword = New-Object System.Windows.Forms.TextBox\n    $txtSMTPPassword.Location = New-Object System.Drawing.Point(140, 113)\n    $txtSMTPPassword.Size = New-Object System.Drawing.Size(400, 20)\n    $txtSMTPPassword.Text = $script:config.SMTPPassword\n    $txtSMTPPassword.PasswordChar = '*'\n    $grpEmail.Controls.Add($txtSMTPPassword)\n    \n    $lblSMTPFrom = New-Object System.Windows.Forms.Label\n    $lblSMTPFrom.Location = New-Object System.Drawing.Point(10, 145)\n    $lblSMTPFrom.Size = New-Object System.Drawing.Size(120, 20)\n    $lblSMTPFrom.Text = \"G&ouml;nderen Email:\"\n    $grpEmail.Controls.Add($lblSMTPFrom)\n    \n    $txtSMTPFrom = New-Object System.Windows.Forms.TextBox\n    $txtSMTPFrom.Location = New-Object System.Drawing.Point(140, 143)\n    $txtSMTPFrom.Size = New-Object System.Drawing.Size(400, 20)\n    $txtSMTPFrom.Text = $script:config.SMTPFrom\n    $grpEmail.Controls.Add($txtSMTPFrom)\n    \n    $lblSMTPTo = New-Object System.Windows.Forms.Label\n    $lblSMTPTo.Location = New-Object System.Drawing.Point(10, 175)\n    $lblSMTPTo.Size = New-Object System.Drawing.Size(120, 20)\n    $lblSMTPTo.Text = \"Al\u0131c\u0131 Email:\"\n    $grpEmail.Controls.Add($lblSMTPTo)\n    \n    $txtSMTPTo = New-Object System.Windows.Forms.TextBox\n    $txtSMTPTo.Location = New-Object System.Drawing.Point(140, 173)\n    $txtSMTPTo.Size = New-Object System.Drawing.Size(400, 20)\n    $txtSMTPTo.Text = $script:config.SMTPTo\n    $grpEmail.Controls.Add($txtSMTPTo)\n    \n    $chkSMTPUseSSL = New-Object System.Windows.Forms.CheckBox\n    $chkSMTPUseSSL.Location = New-Object System.Drawing.Point(10, 205)\n    $chkSMTPUseSSL.Size = New-Object System.Drawing.Size(200, 20)\n    $chkSMTPUseSSL.Text = \"SSL Kullan\"\n    $chkSMTPUseSSL.Checked = $script:config.SMTPUseSSL\n    $grpEmail.Controls.Add($chkSMTPUseSSL)\n    \n    $yPos += 260\n    \n    # Zamanlay\u0131c\u0131 Ayarlar\u0131\n    $grpSchedule = New-Object System.Windows.Forms.GroupBox\n    $grpSchedule.Location = New-Object System.Drawing.Point(10, $yPos)\n    $grpSchedule.Size = New-Object System.Drawing.Size(560, 100)\n    $grpSchedule.Text = \"Otomatik G&ouml;rev Zamanlay\u0131c\u0131\"\n    $settingsForm.Controls.Add($grpSchedule)\n    \n    $chkScheduleEnabled = New-Object System.Windows.Forms.CheckBox\n    $chkScheduleEnabled.Location = New-Object System.Drawing.Point(10, 25)\n    $chkScheduleEnabled.Size = New-Object System.Drawing.Size(200, 20)\n    $chkScheduleEnabled.Text = \"Otomatik Test Aktif\"\n    $chkScheduleEnabled.Checked = $script:config.ScheduleEnabled\n    $grpSchedule.Controls.Add($chkScheduleEnabled)\n    \n    $lblInterval = New-Object System.Windows.Forms.Label\n    $lblInterval.Location = New-Object System.Drawing.Point(10, 55)\n    $lblInterval.Size = New-Object System.Drawing.Size(120, 20)\n    $lblInterval.Text = \"Test Aral\u0131\u011f\u0131 (dk):\"\n    $grpSchedule.Controls.Add($lblInterval)\n    \n    $txtInterval = New-Object System.Windows.Forms.NumericUpDown\n    $txtInterval.Location = New-Object System.Drawing.Point(140, 53)\n    $txtInterval.Size = New-Object System.Drawing.Size(100, 20)\n    $txtInterval.Minimum = 5\n    $txtInterval.Maximum = 1440\n    $txtInterval.Value = $script:config.ScheduleInterval\n    $grpSchedule.Controls.Add($txtInterval)\n    \n    $lblIntervalInfo = New-Object System.Windows.Forms.Label\n    $lblIntervalInfo.Location = New-Object System.Drawing.Point(250, 55)\n    $lblIntervalInfo.Size = New-Object System.Drawing.Size(290, 20)\n    $lblIntervalInfo.Text = \"(5-1440 dakika aras\u0131, &ouml;nerilen: 60)\"\n    $lblIntervalInfo.ForeColor = [System.Drawing.Color]::Gray\n    $grpSchedule.Controls.Add($lblIntervalInfo)\n    \n    $yPos += 120\n    \n    # Butonlar\n    $btnSave = New-Object System.Windows.Forms.Button\n    $btnSave.Location = New-Object System.Drawing.Point(350, $yPos)\n    $btnSave.Size = New-Object System.Drawing.Size(100, 30)\n    $btnSave.Text = \"Kaydet\"\n    $btnSave.BackColor = [System.Drawing.Color]::LightGreen\n    $btnSave.DialogResult = [System.Windows.Forms.DialogResult]::OK\n    $settingsForm.Controls.Add($btnSave)\n    \n    $btnCancel = New-Object System.Windows.Forms.Button\n    $btnCancel.Location = New-Object System.Drawing.Point(460, $yPos)\n    $btnCancel.Size = New-Object System.Drawing.Size(100, 30)\n    $btnCancel.Text = \"\u0130ptal\"\n    $btnCancel.BackColor = [System.Drawing.Color]::LightCoral\n    $btnCancel.DialogResult = [System.Windows.Forms.DialogResult]::Cancel\n    $settingsForm.Controls.Add($btnCancel)\n    \n    $btnSave.Add_Click({\n        # Ayarlar\u0131 kaydet\n        $script:config.ServerIP = $txtSettingsServerIP.Text.Trim()\n        $script:config.SharePath = $txtSettingsSharePath.Text.Trim()\n        $script:config.EmailEnabled = $chkEmailEnabled.Checked\n        $script:config.SMTPServer = $txtSMTPServer.Text.Trim()\n        $script:config.SMTPPort = [int]$txtSMTPPort.Text\n        $script:config.SMTPUsername = $txtSMTPUsername.Text.Trim()\n        $script:config.SMTPPassword = $txtSMTPPassword.Text\n        $script:config.SMTPFrom = $txtSMTPFrom.Text.Trim()\n        $script:config.SMTPTo = $txtSMTPTo.Text.Trim()\n        $script:config.SMTPUseSSL = $chkSMTPUseSSL.Checked\n        \n        $oldScheduleEnabled = $script:config.ScheduleEnabled\n        $script:config.ScheduleEnabled = $chkScheduleEnabled.Checked\n        $script:config.ScheduleInterval = [int]$txtInterval.Value\n        \n        if (Save-Config) {\n            # Zamanlay\u0131c\u0131 ayarlar\u0131n\u0131 uygula\n            if ($script:config.ScheduleEnabled -and -not $oldScheduleEnabled) {\n                Register-ScheduledTask -IntervalMinutes $script:config.ScheduleInterval\n            } elseif (-not $script:config.ScheduleEnabled -and $oldScheduleEnabled) {\n                Unregister-ScheduledTask\n            } elseif ($script:config.ScheduleEnabled) {\n                Register-ScheduledTask -IntervalMinutes $script:config.ScheduleInterval\n            }\n            \n            # Ana formdaki textbox'lar\u0131 g&uuml;ncelle\n            $txtServerIP.Text = $script:config.ServerIP\n            $txtSharePath.Text = $script:config.SharePath\n            \n            [System.Windows.Forms.MessageBox]::Show(\"Ayarlar ba\u015far\u0131yla kaydedildi!\", \"Bilgi\", [System.Windows.Forms.MessageBoxButtons]::OK, [System.Windows.Forms.MessageBoxIcon]::Information)\n        }\n    })\n    \n    $settingsForm.AcceptButton = $btnSave\n    $settingsForm.CancelButton = $btnCancel\n    \n    [void]$settingsForm.ShowDialog()\n}\n#endregion\n\n#region Main GUI\n# Load configuration\nLoad-Config\n\nif ($AutoRun) {\n    # Otomatik &ccedil;al\u0131\u015ft\u0131rma modu - GUI olmadan\n    Write-Host \"Otomatik test ba\u015flat\u0131l\u0131yor...\" -ForegroundColor Green\n    \n    $timestamp = Get-Date -Format \"yyyyMMdd_HHmmss\"\n    $script:reportFile = Join-Path $script:OutputPath \"${timestamp}_OtomatikTest.txt\"\n    \n    $utf8BOM = New-Object System.Text.UTF8Encoding $true\n    $header = \"Test: OTOMAT\u0130K TEST`r`nTarih: $(Get-Date)`r`nSunucu: $env:COMPUTERNAME`r`n================================================================`r`n`r`n\"\n    [System.IO.File]::WriteAllText($script:reportFile, $header, $utf8BOM)\n    \n    # Testleri &ccedil;al\u0131\u015ft\u0131r\n    if ($script:config.ScheduleTests -contains \"Network\") {\n        Write-Host \"A\u011f Gecikme Testi...\" -ForegroundColor Yellow\n        Test-NetworkLatency\n    }\n    \n    if ($script:config.ScheduleTests -contains \"Bandwidth\") {\n        Write-Host \"Bant Geni\u015fli\u011fi Testi...\" -ForegroundColor Yellow\n        Test-Bandwidth\n    }\n    \n    if ($script:config.ScheduleTests -contains \"SMB\") {\n        Write-Host \"SMB Testi...\" -ForegroundColor Yellow\n        Test-SMBPerformance\n    }\n    \n    if ($script:config.ScheduleTests -contains \"IOPS\") {\n        Write-Host \"IOPS Testi...\" -ForegroundColor Yellow\n        Test-IOPS\n    }\n    \n    # Email g&ouml;nder\n    if ($script:config.EmailEnabled) {\n        Send-EmailReport -ReportFile $script:reportFile\n    }\n    \n    Write-Host \"Otomatik test tamamland\u0131!\" -ForegroundColor Green\n    exit 0\n}\n\n# GUI Mode\n$form = New-Object System.Windows.Forms.Form\n$form.Text = \"File Server Performance Test Tool v2.0\"\n$form.Size = New-Object System.Drawing.Size(900, 750)\n$form.StartPosition = \"CenterScreen\"\n$form.FormBorderStyle = \"FixedDialog\"\n$form.MaximizeBox = $false\n\n# Title Label\n$lblTitle = New-Object System.Windows.Forms.Label\n$lblTitle.Location = New-Object System.Drawing.Point(10, 10)\n$lblTitle.Size = New-Object System.Drawing.Size(860, 30)\n$lblTitle.Text = \"FILE SERVER PERFORMANCE TEST TOOL v2.0 - Advanced Edition\"\n$lblTitle.Font = New-Object System.Drawing.Font(\"Arial\", 12, [System.Drawing.FontStyle]::Bold)\n$lblTitle.ForeColor = [System.Drawing.Color]::DarkBlue\n$lblTitle.TextAlign = \"MiddleCenter\"\n$form.Controls.Add($lblTitle)\n\n# Input Group\n$groupInput = New-Object System.Windows.Forms.GroupBox\n$groupInput.Location = New-Object System.Drawing.Point(10, 50)\n$groupInput.Size = New-Object System.Drawing.Size(860, 80)\n$groupInput.Text = \"Test Parametreleri\"\n$form.Controls.Add($groupInput)\n\n# Server IP Label\n$lblServerIP = New-Object System.Windows.Forms.Label\n$lblServerIP.Location = New-Object System.Drawing.Point(10, 25)\n$lblServerIP.Size = New-Object System.Drawing.Size(100, 20)\n$lblServerIP.Text = \"Sunucu IP:\"\n$groupInput.Controls.Add($lblServerIP)\n\n# Server IP TextBox\n$txtServerIP = New-Object System.Windows.Forms.TextBox\n$txtServerIP.Location = New-Object System.Drawing.Point(120, 23)\n$txtServerIP.Size = New-Object System.Drawing.Size(300, 20)\n$txtServerIP.Text = $script:config.ServerIP\n$groupInput.Controls.Add($txtServerIP)\n\n# Share Path Label\n$lblSharePath = New-Object System.Windows.Forms.Label\n$lblSharePath.Location = New-Object System.Drawing.Point(10, 50)\n$lblSharePath.Size = New-Object System.Drawing.Size(100, 20)\n$lblSharePath.Text = \"Share Path:\"\n$groupInput.Controls.Add($lblSharePath)\n\n# Share Path TextBox\n$txtSharePath = New-Object System.Windows.Forms.TextBox\n$txtSharePath.Location = New-Object System.Drawing.Point(120, 48)\n$txtSharePath.Size = New-Object System.Drawing.Size(300, 20)\n$txtSharePath.Text = $script:config.SharePath\n$groupInput.Controls.Add($txtSharePath)\n\n# Settings Button\n$btnSettings = New-Object System.Windows.Forms.Button\n$btnSettings.Location = New-Object System.Drawing.Point(440, 23)\n$btnSettings.Size = New-Object System.Drawing.Size(130, 45)\n$btnSettings.Text = \"\u2699 Ayarlar\"\n$btnSettings.BackColor = [System.Drawing.Color]::LightSteelBlue\n$btnSettings.Font = New-Object System.Drawing.Font(\"Arial\", 10, [System.Drawing.FontStyle]::Bold)\n$groupInput.Controls.Add($btnSettings)\n\n# Status Label\n$lblStatus = New-Object System.Windows.Forms.Label\n$lblStatus.Location = New-Object System.Drawing.Point(590, 25)\n$lblStatus.Size = New-Object System.Drawing.Size(250, 45)\n$lblStatus.Text = \"Email: \" + $(if ($script:config.EmailEnabled) { \"Aktif \u2713\" } else { \"Pasif \u2717\" }) + \"`nZamanlay\u0131c\u0131: \" + $(if ($script:config.ScheduleEnabled) { \"Aktif \u2713\" } else { \"Pasif \u2717\" })\n$lblStatus.ForeColor = [System.Drawing.Color]::DarkGreen\n$groupInput.Controls.Add($lblStatus)\n\n# Test Buttons Group\n$groupTests = New-Object System.Windows.Forms.GroupBox\n$groupTests.Location = New-Object System.Drawing.Point(10, 140)\n$groupTests.Size = New-Object System.Drawing.Size(860, 100)\n$groupTests.Text = \"Test \u0130\u015flemleri\"\n$form.Controls.Add($groupTests)\n\n# Network Test Button\n$btnNetworkTest = New-Object System.Windows.Forms.Button\n$btnNetworkTest.Location = New-Object System.Drawing.Point(10, 25)\n$btnNetworkTest.Size = New-Object System.Drawing.Size(130, 30)\n$btnNetworkTest.Text = \"A\u011f Gecikme Testi\"\n$btnNetworkTest.BackColor = [System.Drawing.Color]::LightBlue\n$groupTests.Controls.Add($btnNetworkTest)\n\n# Bandwidth Test Button\n$btnBandwidthTest = New-Object System.Windows.Forms.Button\n$btnBandwidthTest.Location = New-Object System.Drawing.Point(150, 25)\n$btnBandwidthTest.Size = New-Object System.Drawing.Size(130, 30)\n$btnBandwidthTest.Text = \"Bant Geni\u015fli\u011fi Testi\"\n$btnBandwidthTest.BackColor = [System.Drawing.Color]::LightBlue\n$groupTests.Controls.Add($btnBandwidthTest)\n\n# SMB Test Button\n$btnSMBTest = New-Object System.Windows.Forms.Button\n$btnSMBTest.Location = New-Object System.Drawing.Point(290, 25)\n$btnSMBTest.Size = New-Object System.Drawing.Size(130, 30)\n$btnSMBTest.Text = \"SMB H\u0131z Testi\"\n$btnSMBTest.BackColor = [System.Drawing.Color]::LightBlue\n$groupTests.Controls.Add($btnSMBTest)\n\n# IOPS Test Button\n$btnIOPSTest = New-Object System.Windows.Forms.Button\n$btnIOPSTest.Location = New-Object System.Drawing.Point(430, 25)\n$btnIOPSTest.Size = New-Object System.Drawing.Size(130, 30)\n$btnIOPSTest.Text = \"IOPS Testi\"\n$btnIOPSTest.BackColor = [System.Drawing.Color]::LightBlue\n$groupTests.Controls.Add($btnIOPSTest)\n\n# Full Test Button\n$btnFullTest = New-Object System.Windows.Forms.Button\n$btnFullTest.Location = New-Object System.Drawing.Point(570, 25)\n$btnFullTest.Size = New-Object System.Drawing.Size(130, 30)\n$btnFullTest.Text = \"T&Uuml;M TESTLER\"\n$btnFullTest.BackColor = [System.Drawing.Color]::LightGreen\n$btnFullTest.Font = New-Object System.Drawing.Font(\"Arial\", 9, [System.Drawing.FontStyle]::Bold)\n$groupTests.Controls.Add($btnFullTest)\n\n# System Info Button\n$btnSystemInfo = New-Object System.Windows.Forms.Button\n$btnSystemInfo.Location = New-Object System.Drawing.Point(710, 25)\n$btnSystemInfo.Size = New-Object System.Drawing.Size(130, 30)\n$btnSystemInfo.Text = \"Sistem Bilgileri\"\n$btnSystemInfo.BackColor = [System.Drawing.Color]::LightYellow\n$groupTests.Controls.Add($btnSystemInfo)\n\n# Clear Log Button\n$btnClearLog = New-Object System.Windows.Forms.Button\n$btnClearLog.Location = New-Object System.Drawing.Point(10, 60)\n$btnClearLog.Size = New-Object System.Drawing.Size(130, 30)\n$btnClearLog.Text = \"Logu Temizle\"\n$btnClearLog.BackColor = [System.Drawing.Color]::LightGray\n$groupTests.Controls.Add($btnClearLog)\n\n# Save Report Button\n$btnSaveReport = New-Object System.Windows.Forms.Button\n$btnSaveReport.Location = New-Object System.Drawing.Point(150, 60)\n$btnSaveReport.Size = New-Object System.Drawing.Size(130, 30)\n$btnSaveReport.Text = \"Raporu A&ccedil;\"\n$btnSaveReport.BackColor = [System.Drawing.Color]::LightCoral\n$groupTests.Controls.Add($btnSaveReport)\n\n# Progress Bar\n$progressBar = New-Object System.Windows.Forms.ProgressBar\n$progressBar.Location = New-Object System.Drawing.Point(290, 65)\n$progressBar.Size = New-Object System.Drawing.Size(550, 20)\n$progressBar.Style = \"Marquee\"\n$progressBar.MarqueeAnimationSpeed = 30\n$progressBar.Visible = $false\n$groupTests.Controls.Add($progressBar)\n\n# Output TextBox\n$textBox = New-Object System.Windows.Forms.RichTextBox\n$textBox.Location = New-Object System.Drawing.Point(10, 250)\n$textBox.Size = New-Object System.Drawing.Size(860, 440)\n$textBox.Multiline = $true\n$textBox.ScrollBars = \"Vertical\"\n$textBox.Font = New-Object System.Drawing.Font(\"Consolas\", 9)\n$textBox.ReadOnly = $true\n$textBox.BackColor = [System.Drawing.Color]::White\n$form.Controls.Add($textBox)\n\nWrite-Log \"FILE SERVER PERFORMANCE TEST TOOL v2.0 - Advanced Edition\" \"Green\"\nWrite-Log \"========================================================`n\" \"Green\"\nWrite-Log \"Ho\u015fgeldiniz! L&uuml;tfen test parametrelerini girin ve test butonlar\u0131na t\u0131klay\u0131n.`n\"\nWrite-Log \"Ayarlar butonundan email ve zamanlay\u0131c\u0131 ayarlar\u0131n\u0131 yapabilirsiniz.`n\" \"Yellow\"\nWrite-Log \"Raporlar: $($script:OutputPath)`n\" \"Cyan\"\n\n#region Event Handlers\n$btnSettings.Add_Click({\n    Show-SettingsForm\n    # Status label'\u0131 g&uuml;ncelle\n    $lblStatus.Text = \"Email: \" + $(if ($script:config.EmailEnabled) { \"Aktif \u2713\" } else { \"Pasif \u2717\" }) + \"`nZamanlay\u0131c\u0131: \" + $(if ($script:config.ScheduleEnabled) { \"Aktif \u2713\" } else { \"Pasif \u2717\" })\n})\n\n$btnNetworkTest.Add_Click({\n    if (-not $script:isRunning) {\n        Disable-Controls\n        $progressBar.Visible = $true\n        Test-NetworkLatency\n        if ($script:config.EmailEnabled -and -not [string]::IsNullOrEmpty($script:reportFile) -and (Test-Path $script:reportFile)) {\n            Send-EmailReport -ReportFile $script:reportFile\n        }\n        $progressBar.Visible = $false\n        Enable-Controls\n    }\n})\n\n$btnBandwidthTest.Add_Click({\n    if (-not $script:isRunning) {\n        Disable-Controls\n        $progressBar.Visible = $true\n        Test-Bandwidth\n        if ($script:config.EmailEnabled -and -not [string]::IsNullOrEmpty($script:reportFile) -and (Test-Path $script:reportFile)) {\n            Send-EmailReport -ReportFile $script:reportFile\n        }\n        $progressBar.Visible = $false\n        Enable-Controls\n    }\n})\n\n$btnSMBTest.Add_Click({\n    if (-not $script:isRunning) {\n        Disable-Controls\n        $progressBar.Visible = $true\n        Test-SMBPerformance\n        if ($script:config.EmailEnabled -and -not [string]::IsNullOrEmpty($script:reportFile) -and (Test-Path $script:reportFile)) {\n            Send-EmailReport -ReportFile $script:reportFile\n        }\n        $progressBar.Visible = $false\n        Enable-Controls\n    }\n})\n\n$btnIOPSTest.Add_Click({\n    if (-not $script:isRunning) {\n        Disable-Controls\n        $progressBar.Visible = $true\n        Test-IOPS\n        if ($script:config.EmailEnabled -and -not [string]::IsNullOrEmpty($script:reportFile) -and (Test-Path $script:reportFile)) {\n            Send-EmailReport -ReportFile $script:reportFile\n        }\n        $progressBar.Visible = $false\n        Enable-Controls\n    }\n})\n\n$btnFullTest.Add_Click({\n    if (-not $script:isRunning) {\n        Disable-Controls\n        $progressBar.Visible = $true\n        \n        # T&uuml;m testler i&ccedil;in tek bir dosya olu\u015ftur - UTF-8 BOM ile\n        $timestamp = Get-Date -Format \"yyyyMMdd_HHmmss\"\n        $script:reportFile = Join-Path $script:OutputPath \"${timestamp}_TumTestler.txt\"\n        \n        $utf8BOM = New-Object System.Text.UTF8Encoding $true\n        $header = \"Test: T&Uuml;M TESTLER`r`nTarih: $(Get-Date)`r`nSunucu: $env:COMPUTERNAME`r`n================================================================`r`n`r`n\"\n        [System.IO.File]::WriteAllText($script:reportFile, $header, $utf8BOM)\n        \n        Get-SystemInfo\n        Test-NetworkLatency\n        Test-Bandwidth\n        Test-SMBPerformance\n        Test-IOPS\n        Write-Log \"`n[OK] T&uuml;m testler tamamland\u0131!\" \"Green\"\n        Write-Log \"Rapor: $script:reportFile\" \"Cyan\"\n        \n        if ($script:config.EmailEnabled -and -not [string]::IsNullOrEmpty($script:reportFile) -and (Test-Path $script:reportFile)) {\n            Send-EmailReport -ReportFile $script:reportFile\n        }\n        \n        $progressBar.Visible = $false\n        Enable-Controls\n    }\n})\n\n$btnSystemInfo.Add_Click({\n    if (-not $script:isRunning) {\n        Disable-Controls\n        Get-SystemInfo\n        Enable-Controls\n    }\n})\n\n$btnClearLog.Add_Click({\n    $textBox.Clear()\n    Write-Log \"Log temizlendi.`n\" \"Yellow\"\n})\n\n$btnSaveReport.Add_Click({\n    if (-not [string]::IsNullOrEmpty($script:reportFile) -and (Test-Path $script:reportFile)) {\n        Start-Process notepad $script:reportFile\n    } else {\n        # Son olu\u015fturulan raporu bul\n        $latestReport = Get-ChildItem -Path $script:OutputPath -Filter \"*.txt\" -ErrorAction SilentlyContinue | Sort-Object LastWriteTime -Descending | Select-Object -First 1\n        if ($latestReport) {\n            Start-Process notepad $latestReport.FullName\n        } else {\n            [System.Windows.Forms.MessageBox]::Show(\"Hen&uuml;z bir rapor olu\u015fturulmad\u0131!\", \"Bilgi\", [System.Windows.Forms.MessageBoxButtons]::OK, [System.Windows.Forms.MessageBoxIcon]::Information)\n        }\n    }\n})\n\n$form.Add_FormClosing({\n    $result = [System.Windows.Forms.MessageBox]::Show(\"Programdan &ccedil;\u0131kmak istedi\u011finize emin misiniz?\", \"&Ccedil;\u0131k\u0131\u015f\", [System.Windows.Forms.MessageBoxButtons]::YesNo, [System.Windows.Forms.MessageBoxIcon]::Question)\n    if ($result -eq [System.Windows.Forms.DialogResult]::No) {\n        $_.Cancel = $true\n    }\n})\n#endregion\n\n# Show Form\n[void]$form.ShowDialog()\n<\/code><\/pre>","excerpt":"\u00a0File Server Performance Test Tool v2.0 ile sunucunuzun performans\u0131n\u0131 test edin","created_at":"2026-01-13 15:46:08","updated_at":"2026-09-07 01:15:46","category_id":9,"view_count":521,"reading_time":27,"status":"published","editor_choice":0,"is_editor_choice":0,"published_at":"2026-01-14 16:51:41","featured_image":"\/uploads\/images\/2026\/01\/6967c9993826c_1768409497.png","slug":"file-server-performance-test-tool-v2-0","category_name":"Yaz\u0131l\u0131m","category_slug":"yazilim"}