<# ================================================================================ Windows Latency & Performance Tuner Copyright (c) 2026 CSTRSK Software. Alle Rechte vorbehalten. Beschreibung: Modularer System-Tuner zur Reduzierung von UI-Latenzen, Deaktivierung von Hintergrund-Telemetrie, I/O-Drosselung und Freischaltung des Energiemodus "Ultimative Leistung". Hinweis: Das Skript aendert Dienste, Richtlinien und Energieprofile. Alle Aenderungen lassen sich ueber den Rollback-Button zuruecksetzen. Deinstallierte Apps muessen bei Bedarf ueber den Store nachinstalliert werden. ================================================================================ #> Add-Type -AssemblyName System.Windows.Forms Add-Type -AssemblyName System.Drawing # Administrator-Pruefung $isAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) if (-not $isAdmin) { [System.Windows.Forms.MessageBox]::Show("Bitte starte das Skript als Administrator!", "Admin-Rechte erforderlich", "OK", "Error") exit } # Hauptfenster konfigurieren $form = New-Object System.Windows.Forms.Form $form.Text = "Windows Latency & Performance Tuner" $form.Size = New-Object System.Drawing.Size(610, 730) $form.StartPosition = "CenterScreen" $form.FormBorderStyle = "FixedDialog" $form.MaximizeBox = $false # Header Label $header = New-Object System.Windows.Forms.Label $header.Location = New-Object System.Drawing.Point(20, 15) $header.Size = New-Object System.Drawing.Size(550, 25) $header.Text = "Systemoptimierung fuer minimale Latenz & maximale Performance" $header.Font = New-Object System.Drawing.Font("Segoe UI", 11, [System.Drawing.FontStyle]::Bold) $form.Controls.Add($header) # Liste aller Checkboxen definieren $checkboxes = @( @{ Name = "cbUI"; Text = "UI-Latenz & Animationen kappen (MenuShowDelay 0, MinAnimate 0)"; Checked = $true }, @{ Name = "cbSearch"; Text = "Bing-Websuche im Startmenue & Copilot deaktivieren"; Checked = $true }, @{ Name = "cbWidgets"; Text = "Taskleisten-Widgets / News-Feeds kappen (WebView2)"; Checked = $true }, @{ Name = "cbGameDVR"; Text = "Xbox Game Bar & Hintergrundaufzeichnung (DVR) deaktivieren"; Checked = $true }, @{ Name = "cbPerfMode"; Text = "Energiemodus 'Beste Leistung' & Plan 'Ultimative Leistung' erzwingen"; Checked = $true }, @{ Name = "cbNoThrottle"; Text = "Windows Power Throttling von Hintergrundprozessen global abschalten"; Checked = $true }, @{ Name = "cbFastBoot"; Text = "Ruhezustand & Schnellstart deaktivieren (powercfg -h off)"; Checked = $true }, @{ Name = "cbSysMain"; Text = "SysMain (Superfetch - Caching & SSD-Last) deaktivieren"; Checked = $true }, @{ Name = "cbWer"; Text = "Windows-Fehlerberichterstattung (WerSvc) stoppen"; Checked = $true }, @{ Name = "cbTelemetry"; Text = "Telemetrie-Dienste & DataCollection deaktivieren"; Checked = $true }, @{ Name = "cbTasks"; Text = "Hintergrund-Wartungstasks (Appraiser, CEIP) deaktivieren"; Checked = $true }, @{ Name = "cbWSearch"; Text = "Windows Search Indexer (WSearch) komplett deaktivieren"; Checked = $false }, @{ Name = "cbBloat"; Text = "UWP-Bloatware-Apps fuer alle Benutzer deinstallieren"; Checked = $false } ) # Checkboxen dynamisch generieren $cbControls = @{} $startTop = 45 $stepY = 25 $index = 0 foreach ($item in $checkboxes) { $cb = New-Object System.Windows.Forms.CheckBox $cb.Location = New-Object System.Drawing.Point(25, ($startTop + ($index * $stepY))) $cb.Size = New-Object System.Drawing.Size(540, 22) $cb.Text = $item.Text $cb.Checked = $item.Checked $cb.Font = New-Object System.Drawing.Font("Segoe UI", 9) $form.Controls.Add($cb) $cbControls[$item.Name] = $cb $index++ } # Log-Ausgabebox $txtLog = New-Object System.Windows.Forms.TextBox $txtLog.Location = New-Object System.Drawing.Point(20, 385) $txtLog.Size = New-Object System.Drawing.Size(555, 205) $txtLog.Multiline = $true $txtLog.ScrollBars = "Vertical" $txtLog.ReadOnly = $true $txtLog.BackColor = [System.Drawing.Color]::FromArgb(245, 245, 245) $txtLog.Font = New-Object System.Drawing.Font("Consolas", 8.5) $form.Controls.Add($txtLog) function Add-TunerLog($message) { $txtLog.AppendText("[$((Get-Date).ToString('HH:mm:ss'))] $message`r`n") $txtLog.ScrollToCaret() $form.Refresh() } # ------------------------------------------------------------------------------ # BUTTON 1: ANWENDEN # ------------------------------------------------------------------------------ $btnApply = New-Object System.Windows.Forms.Button $btnApply.Location = New-Object System.Drawing.Point(20, 605) $btnApply.Size = New-Object System.Drawing.Size(180, 40) $btnApply.Text = "Anwenden" $btnApply.Font = New-Object System.Drawing.Font("Segoe UI", 9, [System.Drawing.FontStyle]::Bold) $btnApply.Add_Click({ $btnApply.Enabled = $false $btnRollback.Enabled = $false if ($cbControls["cbUI"].Checked) { Add-TunerLog "Kappe Animationen & setze MenuShowDelay auf 0..." Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "MenuShowDelay" -Type String -Value "0" Set-ItemProperty -Path "HKCU:\Control Panel\Desktop\WindowMetrics" -Name "MinAnimate" -Type String -Value "0" Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "TaskbarAnimations" -Type DWord -Value 0 $vfx = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects" if (!(Test-Path $vfx)) { New-Item -Path $vfx -Force | Out-Null } Set-ItemProperty -Path $vfx -Name "VisualFXSetting" -Type DWord -Value 2 } if ($cbControls["cbSearch"].Checked) { Add-TunerLog "Deaktiviere Startmenue-Websuche & Copilot..." $search = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search" Set-ItemProperty -Path $search -Name "BingSearchEnabled" -Type DWord -Value 0 Set-ItemProperty -Path $search -Name "CortanaConsent" -Type DWord -Value 0 $pSearch = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" if (!(Test-Path $pSearch)) { New-Item -Path $pSearch -Force | Out-Null } Set-ItemProperty -Path $pSearch -Name "DisableWebSearch" -Type DWord -Value 1 Set-ItemProperty -Path $pSearch -Name "ConnectedSearchUseWeb" -Type DWord -Value 0 $pCopilot = "HKCU:\Software\Policies\Microsoft\Windows\WindowsCopilot" if (!(Test-Path $pCopilot)) { New-Item -Path $pCopilot -Force | Out-Null } Set-ItemProperty -Path $pCopilot -Name "TurnOffWindowsCopilot" -Type DWord -Value 1 } if ($cbControls["cbWidgets"].Checked) { Add-TunerLog "Deaktiviere Taskleisten-Widgets..." Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "TaskbarDa" -Type DWord -Value 0 $dsh = "HKLM:\SOFTWARE\Policies\Microsoft\Dsh" if (!(Test-Path $dsh)) { New-Item -Path $dsh -Force | Out-Null } Set-ItemProperty -Path $dsh -Name "AllowNewsAndInterests" -Type DWord -Value 0 } if ($cbControls["cbGameDVR"].Checked) { Add-TunerLog "Deaktiviere Game DVR & Hintergrundaufzeichnung..." $gameCfg = "HKCU:\System\GameConfigStore" if (!(Test-Path $gameCfg)) { New-Item -Path $gameCfg -Force | Out-Null } Set-ItemProperty -Path $gameCfg -Name "GameDVR_Enabled" -Type DWord -Value 0 $gamePol = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR" if (!(Test-Path $gamePol)) { New-Item -Path $gamePol -Force | Out-Null } Set-ItemProperty -Path $gamePol -Name "AllowGameDVR" -Type DWord -Value 0 } if ($cbControls["cbPerfMode"].Checked) { Add-TunerLog "Erzwinge 'Beste Leistung' & aktiviere 'Ultimative Leistung'..." powercfg /overlaysetactive AC ded574b5-45a0-4f42-8737-46345c09c238 2>$null powercfg /overlaysetactive DC ded574b5-45a0-4f42-8737-46345c09c238 2>$null powercfg -duplicatescheme e9a42b02-d5df-448d-aa00-03f14749eb61 2>$null | Out-Null powercfg /setactive e9a42b02-d5df-448d-aa00-03f14749eb61 2>$null } if ($cbControls["cbNoThrottle"].Checked) { Add-TunerLog "Schalte Windows Power Throttling global aus..." $pt = "HKLM:\SYSTEM\CurrentControlSet\Control\Power\PowerThrottling" if (!(Test-Path $pt)) { New-Item -Path $pt -Force | Out-Null } Set-ItemProperty -Path $pt -Name "PowerThrottlingOff" -Type DWord -Value 1 } if ($cbControls["cbFastBoot"].Checked) { Add-TunerLog "Deaktiviere Ruhezustand & hiberfil.sys (powercfg -h off)..." powercfg -h off } if ($cbControls["cbSysMain"].Checked) { Add-TunerLog "Stoppe und deaktiviere SysMain..." Stop-Service -Name "SysMain" -Force -ErrorAction SilentlyContinue Set-Service -Name "SysMain" -StartupType Disabled -ErrorAction SilentlyContinue } if ($cbControls["cbWer"].Checked) { Add-TunerLog "Deaktiviere Windows-Fehlerberichterstattung (WerSvc)..." Stop-Service -Name "WerSvc" -Force -ErrorAction SilentlyContinue Set-Service -Name "WerSvc" -StartupType Disabled -ErrorAction SilentlyContinue $wer = "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting" if (!(Test-Path $wer)) { New-Item -Path $wer -Force | Out-Null } Set-ItemProperty -Path $wer -Name "Disabled" -Type DWord -Value 1 } if ($cbControls["cbTelemetry"].Checked) { Add-TunerLog "Deaktiviere Telemetriedienste..." $services = @("DiagTrack", "dmwappushservice", "diagnosticshub.standardcollector.service") foreach ($s in $services) { Stop-Service -Name $s -Force -ErrorAction SilentlyContinue Set-Service -Name $s -StartupType Disabled -ErrorAction SilentlyContinue } $dataCol = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" if (!(Test-Path $dataCol)) { New-Item -Path $dataCol -Force | Out-Null } Set-ItemProperty -Path $dataCol -Name "AllowTelemetry" -Type DWord -Value 0 $cloud = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" if (!(Test-Path $cloud)) { New-Item -Path $cloud -Force | Out-Null } Set-ItemProperty -Path $cloud -Name "DisableWindowsConsumerFeatures" -Type DWord -Value 1 } if ($cbControls["cbTasks"].Checked) { Add-TunerLog "Deaktiviere Hintergrund-Wartungstasks..." $tasks = @( "\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser", "\Microsoft\Windows\Application Experience\ProgramDataUpdater", "\Microsoft\Windows\Customer Experience Improvement Program\Consolidator", "\Microsoft\Windows\Customer Experience Improvement Program\UsbCeip", "\Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector" ) foreach ($t in $tasks) { Disable-ScheduledTask -TaskName $t -ErrorAction SilentlyContinue | Out-Null } } if ($cbControls["cbWSearch"].Checked) { Add-TunerLog "Deaktiviere Windows Search Indexer..." Stop-Service -Name "WSearch" -Force -ErrorAction SilentlyContinue Set-Service -Name "WSearch" -StartupType Disabled -ErrorAction SilentlyContinue } if ($cbControls["cbBloat"].Checked) { Add-TunerLog "Entferne UWP-Apps fuer alle Benutzer..." $apps = @("*BingNews*", "*BingWeather*", "*GetHelp*", "*Getstarted*", "*MicrosoftOfficeHub*", "*MicrosoftSolitaireCollection*", "*People*", "*WindowsMaps*", "*YourPhone*") foreach ($app in $apps) { Get-AppxPackage -AllUsers -Name $app -ErrorAction SilentlyContinue | Remove-AppxPackage -AllUsers -ErrorAction SilentlyContinue Get-AppxProvisionedPackage -Online | Where-Object { $_.DisplayName -like $app } | Remove-AppxProvisionedPackage -Online -ErrorAction SilentlyContinue | Out-Null } } Add-TunerLog "Vorgang abgeschlossen! Explorer neu starten oder Reboot empfohlen." $btnApply.Enabled = $true $btnRollback.Enabled = $true }) $form.Controls.Add($btnApply) # ------------------------------------------------------------------------------ # BUTTON 2: ROLLBACK (STANDARD WIEDERHERSTELLEN) # ------------------------------------------------------------------------------ $btnRollback = New-Object System.Windows.Forms.Button $btnRollback.Location = New-Object System.Drawing.Point(208, 605) $btnRollback.Size = New-Object System.Drawing.Size(180, 40) $btnRollback.Text = "Rollback (Standard)" $btnRollback.Font = New-Object System.Drawing.Font("Segoe UI", 9, [System.Drawing.FontStyle]::Bold) $btnRollback.Add_Click({ $btnApply.Enabled = $false $btnRollback.Enabled = $false if ($cbControls["cbUI"].Checked) { Add-TunerLog "[Rollback] Stelle UI-Animationen & Menueverzoegerung (400ms) wieder her..." Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "MenuShowDelay" -Type String -Value "400" Set-ItemProperty -Path "HKCU:\Control Panel\Desktop\WindowMetrics" -Name "MinAnimate" -Type String -Value "1" Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "TaskbarAnimations" -Type DWord -Value 1 Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects" -Name "VisualFXSetting" -ErrorAction SilentlyContinue } if ($cbControls["cbSearch"].Checked) { Add-TunerLog "[Rollback] Aktiviere Startmenue-Websuche & Copilot..." Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search" -Name "BingSearchEnabled" -ErrorAction SilentlyContinue Remove-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Search" -Name "CortanaConsent" -ErrorAction SilentlyContinue Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" -Name "DisableWebSearch" -ErrorAction SilentlyContinue Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" -Name "ConnectedSearchUseWeb" -ErrorAction SilentlyContinue Remove-ItemProperty -Path "HKCU:\Software\Policies\Microsoft\Windows\WindowsCopilot" -Name "TurnOffWindowsCopilot" -ErrorAction SilentlyContinue } if ($cbControls["cbWidgets"].Checked) { Add-TunerLog "[Rollback] Aktiviere Taskleisten-Widgets..." Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "TaskbarDa" -Type DWord -Value 1 Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Dsh" -Name "AllowNewsAndInterests" -ErrorAction SilentlyContinue } if ($cbControls["cbGameDVR"].Checked) { Add-TunerLog "[Rollback] Aktiviere Game DVR & Aufzeichnung..." Set-ItemProperty -Path "HKCU:\System\GameConfigStore" -Name "GameDVR_Enabled" -Type DWord -Value 1 -ErrorAction SilentlyContinue Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR" -Name "AllowGameDVR" -ErrorAction SilentlyContinue } if ($cbControls["cbPerfMode"].Checked) { Add-TunerLog "[Rollback] Setze Energieplan auf Ausbalanciert zurueck..." powercfg /overlaysetactive AC 00000000-0000-0000-0000-000000000000 2>$null powercfg /overlaysetactive DC 00000000-0000-0000-0000-000000000000 2>$null powercfg /setactive 381b4222-f694-41f0-9685-ff5bb260df2e 2>$null } if ($cbControls["cbNoThrottle"].Checked) { Add-TunerLog "[Rollback] Reaktiviere Standard Power Throttling..." Remove-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Power\PowerThrottling" -Name "PowerThrottlingOff" -ErrorAction SilentlyContinue } if ($cbControls["cbFastBoot"].Checked) { Add-TunerLog "[Rollback] Aktiviere Ruhezustand & Schnellstart (powercfg -h on)..." powercfg -h on } if ($cbControls["cbSysMain"].Checked) { Add-TunerLog "[Rollback] Aktiviere und starte SysMain wieder..." Set-Service -Name "SysMain" -StartupType Automatic -ErrorAction SilentlyContinue Start-Service -Name "SysMain" -ErrorAction SilentlyContinue } if ($cbControls["cbWer"].Checked) { Add-TunerLog "[Rollback] Aktiviere Windows-Fehlerberichterstattung..." Set-Service -Name "WerSvc" -StartupType Manual -ErrorAction SilentlyContinue Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "Disabled" -ErrorAction SilentlyContinue } if ($cbControls["cbTelemetry"].Checked) { Add-TunerLog "[Rollback] Setze Telemetriedienste auf Standard zurueck..." Set-Service -Name "DiagTrack" -StartupType Automatic -ErrorAction SilentlyContinue Start-Service -Name "DiagTrack" -ErrorAction SilentlyContinue Set-Service -Name "dmwappushservice" -StartupType Manual -ErrorAction SilentlyContinue Set-Service -Name "diagnosticshub.standardcollector.service" -StartupType Manual -ErrorAction SilentlyContinue Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" -Name "AllowTelemetry" -ErrorAction SilentlyContinue Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Name "DisableWindowsConsumerFeatures" -ErrorAction SilentlyContinue } if ($cbControls["cbTasks"].Checked) { Add-TunerLog "[Rollback] Reaktiviere Hintergrund-Tasks..." $tasks = @( "\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser", "\Microsoft\Windows\Application Experience\ProgramDataUpdater", "\Microsoft\Windows\Customer Experience Improvement Program\Consolidator", "\Microsoft\Windows\Customer Experience Improvement Program\UsbCeip", "\Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector" ) foreach ($t in $tasks) { Enable-ScheduledTask -TaskName $t -ErrorAction SilentlyContinue | Out-Null } } if ($cbControls["cbWSearch"].Checked) { Add-TunerLog "[Rollback] Aktiviere und starte Windows Search Indexer..." Set-Service -Name "WSearch" -StartupType Automatic -ErrorAction SilentlyContinue Start-Service -Name "WSearch" -ErrorAction SilentlyContinue } if ($cbControls["cbBloat"].Checked) { Add-TunerLog "[Info] Deinstallierte Apps koennen bei Bedarf im Microsoft Store nachinstalliert werden." } Add-TunerLog "Rollback abgeschlossen! Explorer neu starten oder Reboot empfohlen." $btnApply.Enabled = $true $btnRollback.Enabled = $true }) $form.Controls.Add($btnRollback) # ------------------------------------------------------------------------------ # BUTTON 3: EXPLORER NEUSTART # ------------------------------------------------------------------------------ $btnRestartExp = New-Object System.Windows.Forms.Button $btnRestartExp.Location = New-Object System.Drawing.Point(395, 605) $btnRestartExp.Size = New-Object System.Drawing.Size(180, 40) $btnRestartExp.Text = "Explorer neu starten" $btnRestartExp.Font = New-Object System.Drawing.Font("Segoe UI", 9) $btnRestartExp.Add_Click({ Add-TunerLog "Starte Explorer.exe neu..." Stop-Process -Name explorer -Force }) $form.Controls.Add($btnRestartExp) # ------------------------------------------------------------------------------ # FOOTER: COPYRIGHT-HINWEIS IN DER UI # ------------------------------------------------------------------------------ $footer = New-Object System.Windows.Forms.Label $footer.Location = New-Object System.Drawing.Point(20, 655) $footer.Size = New-Object System.Drawing.Size(555, 20) $footer.Text = "(c) 2026 CSTRSK Software - Windows Latency & Performance Tuner - Alle Rechte vorbehalten." $footer.TextAlign = [System.Drawing.ContentAlignment]::MiddleCenter $footer.Font = New-Object System.Drawing.Font("Segoe UI", 8) $footer.ForeColor = [System.Drawing.Color]::Gray $form.Controls.Add($footer) # Formular starten $form.ShowDialog() | Out-Null