#Requires -Version 5.1 <# PanosOptimizationTool - Gaming PC Optimizer Hardware scanner, 65 reversible FPS / latency / debloat / privacy tweaks, winget app installer, system tools and Windows Update policies. Run: Launch-PanosOptimizationTool.cmd (or) powershell -ExecutionPolicy Bypass -File .\PanosOptimizationTool.ps1 Everything is logged to %ProgramData%\PanosOptimizationTool\panosoptimizationtool.log #> param( [switch]$NoElevate, # run without asking for admin (UI testing only) [string]$Snapshot, # render every page to PNGs in this folder and exit [switch]$Demo # testing: show the Dell and AMD tabs and two sample monitors on any PC ) $AppVersion = '1.0.0' # ---------------------------------------------------------------- elevation / STA $isAdmin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) $isSta = [Threading.Thread]::CurrentThread.GetApartmentState() -eq 'STA' if ((-not $isAdmin -and -not $NoElevate -and -not $Snapshot) -or -not $isSta) { if (-not $PSCommandPath) { Write-Host 'Please run PanosOptimizationTool from the .ps1 file or Launch-PanosOptimizationTool.cmd'; exit 1 } $a = "-NoProfile -ExecutionPolicy Bypass -STA -WindowStyle Hidden -File `"$PSCommandPath`"" if ($NoElevate) { $a += ' -NoElevate' } if ($Snapshot) { $a += " -Snapshot `"$Snapshot`"" } if ($Demo) { $a += ' -Demo' } try { if ($isAdmin -or $NoElevate -or $Snapshot) { Start-Process powershell.exe -ArgumentList $a -Wait:([bool]$Snapshot) } else { Start-Process powershell.exe -Verb RunAs -ArgumentList $a } } catch { Write-Host '' Write-Host ' PanosOptimizationTool needs administrator rights.' -ForegroundColor Yellow Write-Host ' Run it again and click YES on the Windows prompt.' -ForegroundColor Yellow exit 1 } exit } Add-Type -AssemblyName PresentationFramework, PresentationCore, WindowsBase, System.Windows.Forms # the elevated console is hidden, so any fatal error is written to crash.log and shown in a message box $CrashLog = Join-Path $env:ProgramData 'PanosOptimizationTool\crash.log' function Write-Crash([string]$What) { try { if (-not (Test-Path (Split-Path $CrashLog))) { New-Item -ItemType Directory -Path (Split-Path $CrashLog) -Force | Out-Null } Add-Content -Path $CrashLog -Value ("[{0}] {1}" -f (Get-Date -Format 'yyyy-MM-dd HH:mm:ss'), $What) -ErrorAction SilentlyContinue } catch {} } trap { Write-Crash ("FATAL: {0}`n at {1}" -f $_.Exception.Message, $_.InvocationInfo.PositionMessage) [System.Windows.MessageBox]::Show("PanosOptimizationTool hit an error and has to close:`n`n$($_.Exception.Message)`n`nDetails: $CrashLog", 'PanosOptimizationTool', 'OK', 'Error') | Out-Null exit 1 } $Sync = [hashtable]::Synchronized(@{}) $Sync.Log = New-Object 'System.Collections.Concurrent.ConcurrentQueue[object]' # ===================================================================================== # CORE (runs in the UI thread AND inside every background worker runspace) # ===================================================================================== $Core = { $ErrorActionPreference = 'Continue' $ProgressPreference = 'SilentlyContinue' try { [Console]::OutputEncoding = [Text.Encoding]::UTF8 } catch {} $DataDir = Join-Path $env:ProgramData 'PanosOptimizationTool' if (-not (Test-Path $DataDir)) { New-Item -ItemType Directory -Path $DataDir -Force | Out-Null } # settings from before the rename (ApexTune): power plan id, service backups for Undo, last boost $OldDataDir = Join-Path $env:ProgramData 'ApexTune' if ((Test-Path $OldDataDir) -and -not (Test-Path (Join-Path $DataDir 'migrated.txt'))) { foreach ($f in 'services-backup.json', 'powerplan.txt', 'last-boost.txt') { if ((Test-Path (Join-Path $OldDataDir $f)) -and -not (Test-Path (Join-Path $DataDir $f))) { Copy-Item (Join-Path $OldDataDir $f) $DataDir -ErrorAction SilentlyContinue } } try { Set-Content -Path (Join-Path $DataDir 'migrated.txt') -Value (Get-Date -Format o) -ErrorAction Stop } catch {} } $ServiceBackupFile = Join-Path $DataDir 'services-backup.json' $PowerPlanFile = Join-Path $DataDir 'powerplan.txt' function Write-Log { param([string]$Msg, [string]$Level = 'info') $line = '[{0}] {1}' -f (Get-Date -Format 'HH:mm:ss'), $Msg if ($Sync) { $Sync.Log.Enqueue(@($Level, $line)) } else { Write-Host $line } } # ---------------------------------------------------------------- registry helpers function RegE($P, $N, $V, $D = $null, $T = 'DWord') { @{ P = $P; N = $N; V = $V; D = $D; T = $T } } function Set-Reg { param($Path, $Name, $Value, [string]$Type = 'DWord') try { if (-not (Test-Path $Path)) { New-Item -Path $Path -Force -ErrorAction Stop | Out-Null } New-ItemProperty -Path $Path -Name $Name -Value $Value -PropertyType $Type -Force -ErrorAction Stop | Out-Null } catch { Write-Log " ! $Path\$Name : $($_.Exception.Message)" 'warn'; if ($Sync) { $Sync.WarnCount = [int]$Sync.WarnCount + 1 } } } function Remove-Reg { param($Path, $Name) if (Test-Path $Path) { Remove-ItemProperty -Path $Path -Name $Name -Force -ErrorAction SilentlyContinue } } function Get-Reg { param($Path, $Name) try { (Get-ItemProperty -Path $Path -Name $Name -ErrorAction Stop).$Name } catch { $null } } function Set-RegList($List) { foreach ($r in $List) { if ($null -eq $r.V) { Remove-Reg $r.P $r.N } else { Set-Reg $r.P $r.N $r.V $r.T } } } # DWORDs read back as UInt32 (0xffffffff -> 4294967295) but are written as Int32 (-1): compare the bit pattern function ConvertTo-U32($X) { if ($X -is [int]) { return [BitConverter]::ToUInt32([BitConverter]::GetBytes([int]$X), 0) } if ($X -is [uint32] -or $X -is [long]) { return [uint32]$X } $X } function Test-RegList($List) { foreach ($r in $List) { $cur = Get-Reg $r.P $r.N if ($null -eq $r.V) { if ($null -ne $cur) { return $false } } elseif ($r.T -eq 'DWord') { if ("$(ConvertTo-U32 $cur)" -ne "$(ConvertTo-U32 $r.V)") { return $false } } elseif ("$cur" -ne "$($r.V)") { return $false } } return $true } # ---------------------------------------------------------------- service helpers function Save-ServiceState([string[]]$Names) { $db = @{} if (Test-Path $ServiceBackupFile) { try { (Get-Content $ServiceBackupFile -Raw | ConvertFrom-Json).psobject.Properties | ForEach-Object { $db[$_.Name] = $_.Value } } catch {} } foreach ($n in $Names) { $s = Get-Service -Name $n -ErrorAction SilentlyContinue if ($s -and -not $db.ContainsKey($n)) { $db[$n] = [string]$s.StartType } } $db | ConvertTo-Json | Set-Content -Path $ServiceBackupFile -Encoding UTF8 } function Set-Svc([string[]]$Names, [string]$Mode) { foreach ($n in $Names) { $s = Get-Service -Name $n -ErrorAction SilentlyContinue if (-not $s) { continue } try { if ($Mode -eq 'Disabled') { Stop-Service -Name $n -Force -ErrorAction SilentlyContinue } Set-Service -Name $n -StartupType $Mode -ErrorAction Stop Write-Log " service $n -> $Mode" } catch { Write-Log " ! service $n : $($_.Exception.Message)" 'warn' } } } function Restore-Svc([string[]]$Names) { $db = @{} if (Test-Path $ServiceBackupFile) { try { (Get-Content $ServiceBackupFile -Raw | ConvertFrom-Json).psobject.Properties | ForEach-Object { $db[$_.Name] = $_.Value } } catch {} } foreach ($n in $Names) { $mode = if ($db.ContainsKey($n)) { $db[$n] } else { 'Manual' } if ($mode -notin 'Automatic', 'Manual', 'Disabled') { $mode = 'Manual' } Set-Svc @($n) $mode } } function Test-Svc([string[]]$Names, [string[]]$Modes) { $found = $false foreach ($n in $Names) { $s = Get-Service -Name $n -ErrorAction SilentlyContinue if ($s) { $found = $true; if ([string]$s.StartType -notin $Modes) { return $false } } } return $found } # ---------------------------------------------------------------- power helpers function Get-PowerIndex($Sub, $Setting) { $o = (powercfg /query scheme_current $Sub $Setting 2>$null) -join "`n" $m = [regex]::Matches($o, '0x([0-9a-fA-F]{8})') if ($m.Count -ge 2) { return [Convert]::ToInt32($m[$m.Count - 2].Groups[1].Value, 16) } return $null } function Set-PowerIndex($Sub, $Setting, [int]$Value) { powercfg /setacvalueindex scheme_current $Sub $Setting $Value 2>$null | Out-Null powercfg /setdcvalueindex scheme_current $Sub $Setting $Value 2>$null | Out-Null powercfg /setactive scheme_current 2>$null | Out-Null } function Get-ActivePlanGuid { $t = (powercfg /getactivescheme) -join ' ' if ($t -match '([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})') { return $matches[1].ToLower() } } function New-SafeRestorePoint { Write-Log 'Creating a system restore point (this can take a minute)...' try { Enable-ComputerRestore -Drive "$env:SystemDrive\" -ErrorAction SilentlyContinue Set-Reg 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore' 'SystemRestorePointCreationFrequency' 0 Checkpoint-Computer -Description ("PanosOptimizationTool " + (Get-Date -Format 'yyyy-MM-dd HH:mm')) -RestorePointType MODIFY_SETTINGS -ErrorAction Stop Write-Log ' restore point created' 'ok' } catch { Write-Log " could not create restore point: $($_.Exception.Message)" 'warn' } } # ---------------------------------------------------------------- shared paths $MM = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile' $GCS = 'HKCU:\System\GameConfigStore' $ADV = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' $CDM = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' $SRCH = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Search' $DESK = 'HKCU:\Control Panel\Desktop' $PERS = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize' $NVC = 'HKLM:\SOFTWARE\NVIDIA Corporation\NvControlPanel2\Client' $IFACES = 'HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces' $BloatApps = @( 'Microsoft.BingNews', 'Microsoft.BingWeather', 'Microsoft.BingSearch', 'Microsoft.GetHelp', 'Microsoft.Getstarted', 'Microsoft.MicrosoftSolitaireCollection', 'Microsoft.People', 'Microsoft.WindowsFeedbackHub', 'Microsoft.WindowsMaps', 'Microsoft.MicrosoftOfficeHub', 'Microsoft.Todos', 'Microsoft.PowerAutomateDesktop', 'Clipchamp.Clipchamp', 'Microsoft.549981C3F5F10', 'MicrosoftTeams', 'MSTeams', 'Microsoft.ZuneVideo', 'Microsoft.MixedReality.Portal', 'Microsoft.SkypeApp', 'Microsoft.Windows.DevHome', 'Microsoft.Copilot', 'Microsoft.OutlookForWindows', 'Disney.37853FC22B2CE', 'BytedancePte.Ltd.TikTok', 'Facebook.Facebook', 'Facebook.InstagramBeta', 'AmazonVideo.PrimeVideo', '5A894077.McAfeeSecurity' ) $ManualServices = @( 'MapsBroker', 'lfsvc', 'RetailDemo', 'Fax', 'WerSvc', 'PcaSvc', 'TrkWks', 'WpcMonSvc', 'SharedAccess', 'PhoneSvc', 'WMPNetworkSvc', 'diagsvc', 'SEMgrSvc', 'wisvc', 'edgeupdate', 'edgeupdatem', 'RemoteRegistry' ) $TelemetryTasks = @( '\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\Autochk\Proxy', '\Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector', '\Microsoft\Windows\Feedback\Siuf\DmClient', '\Microsoft\Windows\Feedback\Siuf\DmClientOnScenarioDownload' ) # ===================================================================================== # TWEAK CATALOG # Presets: g = Gaming (recommended) m = Max FPS (adds aggressive ones) # d = Debloat p = Privacy # ===================================================================================== $Tweaks = @( # ------------------------------------------------------------------ GAMING & LATENCY @{ Id = 'gamemode'; Cat = 'Gaming & Latency'; Risk = 'Safe'; Presets = 'g', 'm' Name = 'Game Mode - Enable' Desc = 'Lets Windows prioritise the game process and pauses Windows Update installs while you play.' Reg = @( (RegE 'HKCU:\Software\Microsoft\GameBar' 'AutoGameModeEnabled' 1), (RegE 'HKCU:\Software\Microsoft\GameBar' 'AllowAutoGameMode' 1) ) } @{ Id = 'hags'; Cat = 'Gaming & Latency'; Risk = 'Safe'; Presets = 'g', 'm'; Reboot = $true Name = 'Hardware-Accelerated GPU Scheduling - Enable' Desc = 'The RTX 40 series GPU manages its own VRAM scheduling. Lowers latency and is required for DLSS 3 Frame Generation.' Reg = @( (RegE 'HKLM:\SYSTEM\CurrentControlSet\Control\GraphicsDrivers' 'HwSchMode' 2 1) ) } @{ Id = 'gamedvr'; Cat = 'Gaming & Latency'; Risk = 'Safe'; Presets = 'g', 'm' Name = 'Xbox Game DVR / Background Recording - Disable' Desc = 'Stops Windows from constantly recording gameplay in the background, which costs FPS and adds frame-time spikes.' Reg = @( (RegE $GCS 'GameDVR_Enabled' 0 1), (RegE 'HKCU:\Software\Microsoft\Windows\CurrentVersion\GameDVR' 'AppCaptureEnabled' 0 1), (RegE 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\GameDVR' 'AllowGameDVR' 0) ) } @{ Id = 'gamebar'; Cat = 'Gaming & Latency'; Risk = 'Moderate'; Presets = 'm' Name = 'Xbox Game Bar Overlay - Disable' Desc = 'Turns off the Win+G overlay and its startup panel. Keep it if you use Game Bar widgets or its FPS counter.' Reg = @( (RegE 'HKCU:\Software\Microsoft\GameBar' 'UseNexusForGameBarEnabled' 0 1), (RegE 'HKCU:\Software\Microsoft\GameBar' 'ShowStartupPanel' 0) ) } @{ Id = 'fso'; Cat = 'Gaming & Latency'; Risk = 'Moderate'; Presets = 'm' Name = 'Fullscreen Optimizations - Disable' Desc = 'Forces true exclusive fullscreen in older DX9/DX11 titles, which can lower input lag. Alt-Tab becomes slower.' Reg = @( (RegE $GCS 'GameDVR_FSEBehaviorMode' 2 0), (RegE $GCS 'GameDVR_HonorUserFSEBehaviorMode' 1 0), (RegE $GCS 'GameDVR_FSEBehavior' 2), (RegE $GCS 'GameDVR_DXGIHonorFSEWindowsCompatible' 1 0) ) } @{ Id = 'winopt'; Cat = 'Gaming & Latency'; Risk = 'Safe'; Presets = 'g', 'm' Name = 'Optimizations for Windowed Games - Enable' Desc = 'Upgrades DX10/11 borderless games to the flip presentation model. Lower latency and lets VRR/G-Sync work in borderless.' Reg = @( (RegE 'HKCU:\Software\Microsoft\DirectX\UserGpuPreferences' 'DirectXUserGlobalSettings' 'SwapEffectUpgradeEnable=1;' $null 'String') ) } @{ Id = 'sysresp'; Cat = 'Gaming & Latency'; Risk = 'Safe'; Presets = 'g', 'm' Name = 'Multimedia Scheduler - Prioritise Games (SystemResponsiveness)' Desc = 'Reserves less CPU time for background multimedia tasks (20% -> 10%) so more goes to the foreground game.' Reg = @( (RegE $MM 'SystemResponsiveness' 10 20) ) } @{ Id = 'netthrottle'; Cat = 'Gaming & Latency'; Risk = 'Safe'; Presets = 'g', 'm' Name = 'Network Throttling - Disable' Desc = 'Removes the packet-processing limit Windows applies while multimedia is playing. Helps online games and Discord.' Reg = @( (RegE $MM 'NetworkThrottlingIndex' 0xffffffff 10) ) } @{ Id = 'gamesprio'; Cat = 'Gaming & Latency'; Risk = 'Safe'; Presets = 'g', 'm' Name = 'Games Task - High CPU & I/O Priority (MMCSS)' Desc = 'Sets the MMCSS "Games" profile to high scheduling category, priority 6 and high I/O priority.' Reg = @( (RegE "$MM\Tasks\Games" 'GPU Priority' 8 8), (RegE "$MM\Tasks\Games" 'Priority' 6 2), (RegE "$MM\Tasks\Games" 'Scheduling Category' 'High' 'Medium' 'String'), (RegE "$MM\Tasks\Games" 'SFIO Priority' 'High' 'Normal' 'String') ) } @{ Id = 'win32prio'; Cat = 'Gaming & Latency'; Risk = 'Moderate'; Presets = 'm' Name = 'Foreground Boost - Short, Fixed Quantums (0x26)' Desc = 'Win32PrioritySeparation 38: gives the active game window shorter, variable-boosted CPU slices for snappier response.' Reg = @( (RegE 'HKLM:\SYSTEM\CurrentControlSet\Control\PriorityControl' 'Win32PrioritySeparation' 38 2) ) } @{ Id = 'mouseaccel'; Cat = 'Gaming & Latency'; Risk = 'Safe'; Presets = 'g', 'm' Name = 'Mouse Acceleration - Disable (1:1 Raw Aim)' Desc = 'Turns off "Enhance pointer precision" so the same hand movement always moves the crosshair the same distance.' Reg = @( (RegE 'HKCU:\Control Panel\Mouse' 'MouseSpeed' '0' '1' 'String'), (RegE 'HKCU:\Control Panel\Mouse' 'MouseThreshold1' '0' '6' 'String'), (RegE 'HKCU:\Control Panel\Mouse' 'MouseThreshold2' '0' '10' 'String') ) } @{ Id = 'powerthrottle'; Cat = 'Gaming & Latency'; Risk = 'Safe'; Presets = 'g', 'm' Name = 'Power Throttling - Disable' Desc = 'Stops Windows from putting background processes (game launchers, voice chat, overlays) on low-power EcoQoS.' Reg = @( (RegE 'HKLM:\SYSTEM\CurrentControlSet\Control\Power\PowerThrottling' 'PowerThrottlingOff' 1) ) } @{ Id = 'timerres'; Cat = 'Gaming & Latency'; Risk = 'Moderate'; Presets = 'm'; Reboot = $true Name = 'Global Timer Resolution Requests - Enable' Desc = 'Windows 11 lets games keep a 0.5 ms timer even when not focused. Gives steadier frame pacing with frame limiters.' Reg = @( (RegE 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\kernel' 'GlobalTimerResolutionRequests' 1) ) } @{ Id = 'dyntick'; Cat = 'Gaming & Latency'; Risk = 'Advanced'; Presets = 'm'; Reboot = $true Name = 'Dynamic Tick - Disable' Desc = 'Keeps the kernel timer ticking at a constant rate instead of idling. Can smooth frame times; uses slightly more idle power.' Apply = { bcdedit /set disabledynamictick yes | Out-Null } Undo = { bcdedit /deletevalue disabledynamictick | Out-Null } Detect = { [bool]((bcdedit /enum '{current}') -match 'disabledynamictick') } } @{ Id = 'stickykeys'; Cat = 'Gaming & Latency'; Risk = 'Safe'; Presets = 'g', 'm' Name = 'Sticky / Filter / Toggle Keys Shortcuts - Disable' Desc = 'No more "Sticky Keys" pop-up throwing you to the desktop after pressing Shift 5 times mid-game.' Reg = @( (RegE 'HKCU:\Control Panel\Accessibility\StickyKeys' 'Flags' '506' '510' 'String'), (RegE 'HKCU:\Control Panel\Accessibility\ToggleKeys' 'Flags' '58' '62' 'String'), (RegE 'HKCU:\Control Panel\Accessibility\Keyboard Response' 'Flags' '122' '126' 'String') ) } @{ Id = 'hvci'; Cat = 'Gaming & Latency'; Risk = 'Advanced'; Reboot = $true Name = 'Memory Integrity (VBS / HVCI) - Disable' Desc = 'CAUTION: lowers kernel protection against malware. Microsoft measured up to ~5-10% FPS loss with it on. Some anti-cheats (Valorant/FACEIT) may want it ON.' Reg = @( (RegE 'HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity' 'Enabled' 0 1) ) } # ------------------------------------------------------------------ POWER @{ Id = 'ultimate'; Cat = 'Power'; Risk = 'Safe'; Presets = 'g', 'm' Name = 'Ultimate Performance Power Plan - Activate' Desc = 'Unlocks and activates the hidden Ultimate Performance plan: no CPU down-clocking delays, no device idle states.' Apply = { $g = $null if (Test-Path $PowerPlanFile) { $g = (Get-Content $PowerPlanFile -Raw).Trim(); if (-not ((powercfg /list) -match $g)) { $g = $null } } if (-not $g) { $out = (powercfg -duplicatescheme e9a42b02-d5df-448d-aa00-03f14749eb61) -join ' ' if ($out -match '([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})') { $g = $matches[1].ToLower(); powercfg -changename $g 'PanosOptimizationTool Ultimate' 'Ultimate Performance tuned by PanosOptimizationTool' | Out-Null Set-Content -Path $PowerPlanFile -Value $g } else { $g = '8c5e7fda-e8bf-4a96-9a85-cf3a7f23b2a7'; Write-Log ' Ultimate plan unavailable, using High performance' 'warn' } } if ($g -ne '8c5e7fda-e8bf-4a96-9a85-cf3a7f23b2a7') { powercfg -changename $g 'PanosOptimizationTool Ultimate' 'Ultimate Performance tuned by PanosOptimizationTool' | Out-Null } powercfg -setactive $g | Out-Null } Undo = { powercfg -setactive 381b4222-f694-41f0-9685-ff5bb260df2e | Out-Null } Detect = { $a = Get-ActivePlanGuid; ($a -eq '8c5e7fda-e8bf-4a96-9a85-cf3a7f23b2a7') -or ((Test-Path $PowerPlanFile) -and $a -eq (Get-Content $PowerPlanFile -Raw).Trim()) } } @{ Id = 'procmin'; Cat = 'Power'; Risk = 'Moderate'; Presets = 'm' Name = 'CPU Minimum State 100%' Desc = 'Keeps the Ryzen cores at full clock instead of ramping up from idle. Removes clock-ramp stutter; higher idle temps.' Apply = { Set-PowerIndex 'sub_processor' 'PROCTHROTTLEMIN' 100 } Undo = { Set-PowerIndex 'sub_processor' 'PROCTHROTTLEMIN' 5 } Detect = { (Get-PowerIndex 'sub_processor' 'PROCTHROTTLEMIN') -eq 100 } } @{ Id = 'usbsuspend'; Cat = 'Power'; Risk = 'Safe'; Presets = 'g', 'm' Name = 'USB Selective Suspend - Disable' Desc = 'Stops Windows from power-cycling USB ports - fixes mouse/keyboard/headset wake-up lag and random disconnects.' Apply = { Set-PowerIndex '2a737441-1930-4402-8d77-b2bebba308a3' '48e6b7a6-50f5-4782-a5d4-53bb8f07e226' 0 } Undo = { Set-PowerIndex '2a737441-1930-4402-8d77-b2bebba308a3' '48e6b7a6-50f5-4782-a5d4-53bb8f07e226' 1 } Detect = { (Get-PowerIndex '2a737441-1930-4402-8d77-b2bebba308a3' '48e6b7a6-50f5-4782-a5d4-53bb8f07e226') -eq 0 } } @{ Id = 'pcieaspm'; Cat = 'Power'; Risk = 'Safe'; Presets = 'g', 'm' Name = 'PCIe Link State Power Management - Off' Desc = 'Keeps the PCIe link to the RTX 4070 and NVMe drive at full power - no link wake-up latency.' Apply = { Set-PowerIndex 'sub_pciexpress' 'ASPM' 0 } Undo = { Set-PowerIndex 'sub_pciexpress' 'ASPM' 1 } Detect = { (Get-PowerIndex 'sub_pciexpress' 'ASPM') -eq 0 } } @{ Id = 'hibernate'; Cat = 'Power'; Risk = 'Safe'; Presets = 'g', 'm' Name = 'Hibernation & Fast Startup - Disable' Desc = 'Frees several GB (hiberfil.sys) and makes every shutdown a clean boot, so drivers really reset.' Apply = { powercfg /h off | Out-Null } Undo = { powercfg /h on | Out-Null } Detect = { (Get-Reg 'HKLM:\SYSTEM\CurrentControlSet\Control\Power' 'HibernateEnabled') -eq 0 } } # ------------------------------------------------------------------ NETWORK @{ Id = 'nagle'; Cat = 'Network'; Risk = 'Moderate'; Presets = 'm' Name = "Nagle's Algorithm - Disable" Desc = 'Sends small game packets immediately instead of batching them (TCPNoDelay + TcpAckFrequency). Mostly helps TCP-based games.' Apply = { Get-ChildItem $IFACES | ForEach-Object { $p = Get-ItemProperty $_.PSPath; if ($p.DhcpIPAddress -or $p.IPAddress) { Set-Reg $_.PSPath 'TcpAckFrequency' 1; Set-Reg $_.PSPath 'TCPNoDelay' 1 } } } Undo = { Get-ChildItem $IFACES | ForEach-Object { Remove-Reg $_.PSPath 'TcpAckFrequency'; Remove-Reg $_.PSPath 'TCPNoDelay' } } Detect = { [bool](Get-ChildItem $IFACES | Where-Object { (Get-ItemProperty $_.PSPath).TCPNoDelay -eq 1 }) } } @{ Id = 'tcpstack'; Cat = 'Network'; Risk = 'Safe'; Presets = 'g', 'm' Name = 'TCP Stack - Gaming Profile' Desc = 'Receive-side scaling on, auto-tuning normal, ECN and TCP timestamps off - lower overhead per packet.' Apply = { netsh int tcp set global rss=enabled | Out-Null; netsh int tcp set global autotuninglevel=normal | Out-Null netsh int tcp set global ecncapability=disabled | Out-Null; netsh int tcp set global timestamps=disabled | Out-Null } Undo = { netsh int tcp set global ecncapability=default | Out-Null; netsh int tcp set global timestamps=default | Out-Null } Detect = { (Get-NetTCPSetting -SettingName Internet -ErrorAction SilentlyContinue).EcnCapability -eq 'Disabled' } } @{ Id = 'nicpower'; Cat = 'Network'; Risk = 'Safe'; Presets = 'g', 'm' Name = 'Network Adapter Power Saving - Disable' Desc = 'Prevents Windows from turning off the Ethernet/Wi-Fi adapter to save power (causes ping spikes after idle).' Apply = { Get-NetAdapter -Physical | Where-Object Status -eq 'Up' | ForEach-Object { Disable-NetAdapterPowerManagement -Name $_.Name -NoRestart -ErrorAction SilentlyContinue } } Undo = { Get-NetAdapter -Physical | Where-Object Status -eq 'Up' | ForEach-Object { Enable-NetAdapterPowerManagement -Name $_.Name -NoRestart -ErrorAction SilentlyContinue } } Detect = { $p = @(Get-NetAdapter -Physical | Where-Object Status -eq 'Up' | Get-NetAdapterPowerManagement -ErrorAction SilentlyContinue) $p.Count -gt 0 -and -not ($p | Where-Object { "$($_.AllowComputerToTurnOffDevice)" -eq 'Enabled' }) } } @{ Id = 'dnscf'; Cat = 'Network'; Risk = 'Safe' Name = 'Cloudflare DNS (1.1.1.1) - Set' Desc = 'Faster, private DNS lookups for game servers and launchers. Undo returns to your router/ISP DNS.' Apply = { Get-NetAdapter -Physical | Where-Object Status -eq 'Up' | ForEach-Object { Set-DnsClientServerAddress -InterfaceIndex $_.ifIndex -ServerAddresses ('1.1.1.1', '1.0.0.1') }; Clear-DnsClientCache } Undo = { Get-NetAdapter -Physical | ForEach-Object { Set-DnsClientServerAddress -InterfaceIndex $_.ifIndex -ResetServerAddresses }; Clear-DnsClientCache } Detect = { @(Get-DnsClientServerAddress -AddressFamily IPv4 -ErrorAction SilentlyContinue | ForEach-Object { $_.ServerAddresses }) -contains '1.1.1.1' } } @{ Id = 'ipv4pref'; Cat = 'Network'; Risk = 'Moderate'; Reboot = $true Name = 'Prefer IPv4 over IPv6' Desc = 'Uses IPv4 first when both exist. Can fix slow matchmaking / connection issues on some ISPs. IPv6 stays enabled.' Reg = @( (RegE 'HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters' 'DisabledComponents' 32) ) } @{ Id = 'deliveryopt'; Cat = 'Network'; Risk = 'Safe'; Presets = 'g', 'm', 'd' Name = 'Delivery Optimization (P2P Updates) - Disable' Desc = 'Stops your PC from uploading Windows updates to other PCs in the background, eating bandwidth while gaming.' Reg = @( (RegE 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization' 'DODownloadMode' 0) ) } # ------------------------------------------------------------------ PERFORMANCE @{ Id = 'memcomp'; Cat = 'Performance'; Risk = 'Moderate'; Presets = 'm' Name = 'Memory Compression - Disable' Desc = 'Saves the CPU work of compressing RAM pages. Fine with 16 GB+ when you close heavy apps while gaming.' Apply = { Disable-MMAgent -MemoryCompression -ErrorAction Stop } Undo = { Enable-MMAgent -MemoryCompression -ErrorAction Stop } Detect = { -not (Get-MMAgent -ErrorAction Stop).MemoryCompression } } @{ Id = 'sysmain'; Cat = 'Performance'; Risk = 'Moderate'; Presets = 'm' Name = 'SysMain (Superfetch) - Disable' Desc = 'On an NVMe SSD prefetching gives little benefit but causes background disk and CPU activity.' Apply = { Save-ServiceState @('SysMain'); Set-Svc @('SysMain') 'Disabled' } Undo = { Restore-Svc @('SysMain') } Detect = { Test-Svc @('SysMain') @('Disabled') } } @{ Id = 'wsearch'; Cat = 'Performance'; Risk = 'Moderate' Name = 'Windows Search Indexing - Disable' Desc = 'Stops the indexer crawling your drives in the background. Start-menu file search becomes slower.' Apply = { Save-ServiceState @('WSearch'); Set-Svc @('WSearch') 'Disabled' } Undo = { Restore-Svc @('WSearch') } Detect = { Test-Svc @('WSearch') @('Disabled') } } @{ Id = 'pagingexec'; Cat = 'Performance'; Risk = 'Moderate'; Presets = 'm'; Reboot = $true Name = 'Keep Kernel & Drivers in RAM' Desc = 'DisablePagingExecutive: kernel-mode code is never paged to disk. Fewer micro-stutters when RAM is under pressure.' Reg = @( (RegE 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management' 'DisablePagingExecutive' 1 0) ) } @{ Id = 'ntfs'; Cat = 'Performance'; Risk = 'Safe'; Presets = 'g', 'm' Name = 'NTFS Last-Access Timestamps - Disable' Desc = 'Stops a disk write every time a file is read - fewer writes while games stream assets.' Apply = { fsutil behavior set disablelastaccess 1 | Out-Null } Undo = { fsutil behavior set disablelastaccess 2 | Out-Null } Detect = { $v = Get-Reg 'HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem' 'NtfsDisableLastAccessUpdate'; ($null -ne $v) -and (($v -band 1) -eq 1) } } @{ Id = 'startupdelay'; Cat = 'Performance'; Risk = 'Safe'; Presets = 'g', 'm' Name = 'Startup App Delay - Remove' Desc = 'Windows waits ~10 s before launching startup apps. This removes the artificial delay.' Reg = @( (RegE 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize' 'StartupDelayInMSec' 0), (RegE 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize' 'WaitForIdleState' 0) ) } @{ Id = 'shutdown'; Cat = 'Performance'; Risk = 'Safe'; Presets = 'g', 'm' Name = 'Faster Shutdown & Hung-App Timeout' Desc = 'Waits 2 s instead of 5 s for services and frozen apps when shutting down.' Reg = @( (RegE 'HKLM:\SYSTEM\CurrentControlSet\Control' 'WaitToKillServiceTimeout' '2000' '5000' 'String'), (RegE $DESK 'HungAppTimeout' '2000' $null 'String'), (RegE $DESK 'WaitToKillAppTimeout' '2000' $null 'String') ) } @{ Id = 'menudelay'; Cat = 'Performance'; Risk = 'Safe'; Presets = 'g', 'm' Name = 'Instant Menus (MenuShowDelay 0)' Desc = 'Menus and sub-menus open immediately instead of after 400 ms.' Reg = @( (RegE $DESK 'MenuShowDelay' '0' '400' 'String') ) } @{ Id = 'visualfx'; Cat = 'Performance'; Risk = 'Safe'; Presets = 'g', 'm' Name = 'Visual Effects - Performance Mode' Desc = 'Turns off window animations, Aero Peek and taskbar animations but keeps smooth fonts and thumbnails.' Reg = @( (RegE 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects' 'VisualFXSetting' 3 0), (RegE $DESK 'UserPreferencesMask' ([byte[]](0x90, 0x12, 0x03, 0x80, 0x10, 0x00, 0x00, 0x00)) ([byte[]](0x9E, 0x1E, 0x07, 0x80, 0x12, 0x00, 0x00, 0x00)) 'Binary'), (RegE "$DESK\WindowMetrics" 'MinAnimate' '0' '1' 'String'), (RegE $ADV 'TaskbarAnimations' 0 1), (RegE 'HKCU:\Software\Microsoft\Windows\DWM' 'EnableAeroPeek' 0 1) ) } @{ Id = 'transparency'; Cat = 'Performance'; Risk = 'Safe'; Presets = 'g', 'm' Name = 'Transparency Effects - Disable' Desc = 'Removes acrylic blur from taskbar, Start and Settings - less DWM GPU work.' Reg = @( (RegE $PERS 'EnableTransparency' 0 1) ) } @{ Id = 'bgapps'; Cat = 'Performance'; Risk = 'Safe'; Presets = 'g', 'm', 'd' Name = 'Background Store Apps - Disable' Desc = 'Stops Microsoft Store apps from running in the background when you are not using them.' Reg = @( (RegE 'HKCU:\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications' 'GlobalUserDisabled' 1 0), (RegE $SRCH 'BackgroundAppGlobalToggle' 0 1) ) } @{ Id = 'nvtelemetry'; Cat = 'Performance'; Risk = 'Safe'; Presets = 'g', 'm', 'p' Name = 'NVIDIA Telemetry - Disable' Desc = 'Disables NVIDIA telemetry scheduled tasks and the driver data-collection opt-in.' Apply = { Get-ScheduledTask -ErrorAction SilentlyContinue | Where-Object { $_.TaskName -like 'NvTm*' -or $_.TaskName -like 'NvProfileUpdater*' } | Disable-ScheduledTask -ErrorAction SilentlyContinue | Out-Null Set-Reg $NVC 'OptInOrOutPreference' 0 } Undo = { Get-ScheduledTask -ErrorAction SilentlyContinue | Where-Object { $_.TaskName -like 'NvTm*' -or $_.TaskName -like 'NvProfileUpdater*' } | Enable-ScheduledTask -ErrorAction SilentlyContinue | Out-Null Set-Reg $NVC 'OptInOrOutPreference' 1 } Detect = { (Get-Reg $NVC 'OptInOrOutPreference') -eq 0 } } @{ Id = 'services'; Cat = 'Performance'; Risk = 'Moderate'; Presets = 'm', 'd' Name = 'Unneeded Services - Set to Manual' Desc = 'Maps, Fax, Retail Demo, Parental Controls, Error Reporting, Edge Update and 11 more start only when something needs them. Xbox services untouched.' Apply = { Save-ServiceState $ManualServices; Set-Svc $ManualServices 'Manual' } Undo = { Restore-Svc $ManualServices } Detect = { Test-Svc $ManualServices @('Manual', 'Disabled') } } # ------------------------------------------------------------------ DEBLOAT @{ Id = 'consumer'; Cat = 'Debloat'; Risk = 'Safe'; Presets = 'g', 'm', 'd' Name = 'Consumer Features (Auto-Installed Apps) - Disable' Desc = 'Stops Windows from silently installing Candy Crush, TikTok and other sponsored apps.' Reg = @( (RegE 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent' 'DisableWindowsConsumerFeatures' 1), (RegE 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent' 'DisableCloudOptimizedContent' 1) ) } @{ Id = 'widgets'; Cat = 'Debloat'; Risk = 'Safe'; Presets = 'g', 'm', 'd' Name = 'Widgets & News Feed - Remove' Desc = 'Removes the Widgets board and its background WebView processes (often 200+ MB RAM).' # some Windows 11 builds lock the Dsh policy key, so the Widgets package itself is removed as well Apply = { try { if (-not (Test-Path 'HKLM:\SOFTWARE\Policies\Microsoft\Dsh')) { New-Item 'HKLM:\SOFTWARE\Policies\Microsoft\Dsh' -Force -ErrorAction Stop | Out-Null } New-ItemProperty 'HKLM:\SOFTWARE\Policies\Microsoft\Dsh' -Name 'AllowNewsAndInterests' -Value 0 -PropertyType DWord -Force -ErrorAction Stop | Out-Null } catch { Write-Log ' Windows locks the Widgets policy on this PC - removing the Widgets package instead' } $wp = Get-AppxPackage -AllUsers -Name 'MicrosoftWindows.Client.WebExperience' -ErrorAction SilentlyContinue if ($wp) { $wp | Remove-AppxPackage -AllUsers -ErrorAction SilentlyContinue; Write-Log ' Widgets package removed' } if (-not ((Get-Reg 'HKLM:\SOFTWARE\Policies\Microsoft\Dsh' 'AllowNewsAndInterests') -eq 0 -or -not (Get-AppxPackage -Name 'MicrosoftWindows.Client.WebExperience' -ErrorAction SilentlyContinue))) { throw 'Widgets could not be disabled' } } Undo = { Remove-Reg 'HKLM:\SOFTWARE\Policies\Microsoft\Dsh' 'AllowNewsAndInterests' if (-not (Get-AppxPackage -Name 'MicrosoftWindows.Client.WebExperience' -ErrorAction SilentlyContinue)) { & winget install --id 9MSSGKG348SP --source msstore -e --accept-package-agreements --accept-source-agreements --disable-interactivity 2>&1 | Out-Null } } Detect = { ((Get-Reg 'HKLM:\SOFTWARE\Policies\Microsoft\Dsh' 'AllowNewsAndInterests') -eq 0) -or -not (Get-AppxPackage -Name 'MicrosoftWindows.Client.WebExperience' -ErrorAction SilentlyContinue) } } @{ Id = 'copilot'; Cat = 'Debloat'; Risk = 'Safe'; Presets = 'd' Name = 'Copilot - Disable' Desc = 'Turns off Windows Copilot and hides its taskbar button.' Reg = @( (RegE 'HKCU:\Software\Policies\Microsoft\Windows\WindowsCopilot' 'TurnOffWindowsCopilot' 1), (RegE 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsCopilot' 'TurnOffWindowsCopilot' 1), (RegE $ADV 'ShowCopilotButton' 0 1) ) } @{ Id = 'recall'; Cat = 'Debloat'; Risk = 'Safe'; Presets = 'd', 'p' Name = 'Recall (AI Screen Snapshots) - Disable' Desc = 'Blocks Windows Recall from taking and analysing screenshots of everything you do.' Reg = @( (RegE 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsAI' 'DisableAIDataAnalysis' 1), (RegE 'HKCU:\Software\Policies\Microsoft\Windows\WindowsAI' 'DisableAIDataAnalysis' 1) ) } @{ Id = 'bing'; Cat = 'Debloat'; Risk = 'Safe'; Presets = 'g', 'm', 'd' Name = 'Bing Web Results in Start Search - Disable' Desc = 'Start search only finds your apps and files - faster and nothing typed is sent to Bing.' Reg = @( (RegE $SRCH 'BingSearchEnabled' 0 1), (RegE 'HKCU:\Software\Policies\Microsoft\Windows\Explorer' 'DisableSearchBoxSuggestions' 1) ) } @{ Id = 'startrec'; Cat = 'Debloat'; Risk = 'Safe'; Presets = 'd' Name = 'Start Menu Recommendations & Promotions - Disable' Desc = 'Hides promoted apps, tips and account nags from the Start menu.' Reg = @( (RegE $ADV 'Start_IrisRecommendations' 0 1), (RegE $ADV 'Start_AccountNotifications' 0 1) ) } @{ Id = 'suggestions'; Cat = 'Debloat'; Risk = 'Safe'; Presets = 'g', 'm', 'd' Name = 'Tips, Suggestions & Lock-Screen Ads - Disable' Desc = 'Turns off "Get even more out of Windows", Settings suggestions, lock-screen ads and silent app installs.' Reg = @( (RegE $CDM 'SubscribedContent-338388Enabled' 0 1), (RegE $CDM 'SubscribedContent-338389Enabled' 0 1), (RegE $CDM 'SubscribedContent-338393Enabled' 0 1), (RegE $CDM 'SubscribedContent-353694Enabled' 0 1), (RegE $CDM 'SubscribedContent-353696Enabled' 0 1), (RegE $CDM 'SubscribedContent-310093Enabled' 0 1), (RegE $CDM 'SystemPaneSuggestionsEnabled' 0 1), (RegE $CDM 'SilentInstalledAppsEnabled' 0 1), (RegE $CDM 'SoftLandingEnabled' 0 1), (RegE $CDM 'RotatingLockScreenOverlayEnabled' 0 1), (RegE 'HKCU:\Software\Microsoft\Windows\CurrentVersion\UserProfileEngagement' 'ScoobeSystemSettingEnabled' 0) ) } @{ Id = 'bloatapps'; Cat = 'Debloat'; Risk = 'Moderate'; Presets = 'd'; NoUndo = $true Name = 'Pre-installed Bloatware - Remove' Desc = 'Removes News, Weather, Solitaire, Clipchamp, Teams (personal), To Do, Feedback Hub, Maps, TikTok, Disney+ and more. Xbox apps are kept. Reinstall from the Store if needed.' Apply = { foreach ($n in $BloatApps) { $pk = Get-AppxPackage -AllUsers -Name $n -ErrorAction SilentlyContinue if ($pk) { $pk | Remove-AppxPackage -AllUsers -ErrorAction SilentlyContinue; Write-Log " removed $n" } Get-AppxProvisionedPackage -Online -ErrorAction SilentlyContinue | Where-Object DisplayName -eq $n | Remove-AppxProvisionedPackage -Online -ErrorAction SilentlyContinue | Out-Null } } Detect = { -not (Get-AppxPackage -ErrorAction SilentlyContinue | Where-Object { $BloatApps -contains $_.Name }) } } @{ Id = 'onedrive'; Cat = 'Debloat'; Risk = 'Advanced' Name = 'OneDrive - Uninstall' Desc = 'Removes OneDrive and its constant background sync. Make sure your files are synced/backed up first!' Apply = { & winget uninstall --id Microsoft.OneDrive -e --silent --accept-source-agreements 2>&1 | Out-Null $s = "$env:SystemRoot\System32\OneDriveSetup.exe"; if ((Test-Path "$env:LOCALAPPDATA\Microsoft\OneDrive\OneDrive.exe") -and (Test-Path $s)) { & $s /uninstall } } Undo = { & winget install --id Microsoft.OneDrive -e --silent --accept-package-agreements --accept-source-agreements 2>&1 | Out-Null } Detect = { -not (Test-Path "$env:LOCALAPPDATA\Microsoft\OneDrive\OneDrive.exe") -and -not (Test-Path "$env:ProgramFiles\Microsoft OneDrive\OneDrive.exe") } } @{ Id = 'edge'; Cat = 'Debloat'; Risk = 'Safe'; Presets = 'd' Name = 'Microsoft Edge - Debloat' Desc = 'Edge no longer runs in the background or pre-loads at startup; removes sidebar, shopping and recommendations.' Reg = @( foreach ($n in 'StartupBoostEnabled', 'BackgroundModeEnabled', 'HubsSidebarEnabled', 'ShowRecommendationsEnabled', 'PersonalizationReportingEnabled', 'EdgeShoppingAssistantEnabled', 'UserFeedbackAllowed', 'DiagnosticData', 'EdgeCollectionsEnabled') { RegE 'HKLM:\SOFTWARE\Policies\Microsoft\Edge' $n 0 } RegE 'HKLM:\SOFTWARE\Policies\Microsoft\Edge' 'HideFirstRunExperience' 1 ) } @{ Id = 'brave'; Cat = 'Debloat'; Risk = 'Safe'; Presets = 'd' Name = 'Brave Browser - Debloat' Desc = 'Disables Brave Rewards, Wallet, VPN, Leo AI, News, Talk and usage pings.' Reg = @( foreach ($n in 'BraveRewardsDisabled', 'BraveWalletDisabled', 'BraveVPNDisabled', 'BraveNewsDisabled', 'BraveTalkDisabled') { RegE 'HKLM:\SOFTWARE\Policies\BraveSoftware\Brave' $n 1 } foreach ($n in 'BraveAIChatEnabled', 'BraveStatsPingEnabled', 'BraveP3AEnabled') { RegE 'HKLM:\SOFTWARE\Policies\BraveSoftware\Brave' $n 0 } ) } @{ Id = 'wer'; Cat = 'Debloat'; Risk = 'Safe'; Presets = 'd', 'p' Name = 'Windows Error Reporting - Disable' Desc = 'No more crash-dump uploads to Microsoft after a game crashes (local event logs still work).' Reg = @( (RegE 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting' 'Disabled' 1 0) ) } # ------------------------------------------------------------------ PRIVACY @{ Id = 'telemetry'; Cat = 'Privacy'; Risk = 'Safe'; Presets = 'g', 'm', 'd', 'p' Name = 'Telemetry & Data Collection - Disable' Desc = 'Sets diagnostic data to minimum, disables the DiagTrack service and the compatibility/CEIP telemetry tasks.' Reg = @( (RegE 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection' 'AllowTelemetry' 0), (RegE 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection' 'AllowTelemetry' 0), (RegE 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection' 'DoNotShowFeedbackNotifications' 1) ) Apply = { Save-ServiceState @('DiagTrack', 'dmwappushservice'); Set-Svc @('DiagTrack', 'dmwappushservice') 'Disabled' foreach ($t in $TelemetryTasks) { schtasks /Change /TN $t /Disable 2>$null | Out-Null } } Undo = { Restore-Svc @('DiagTrack', 'dmwappushservice'); foreach ($t in $TelemetryTasks) { schtasks /Change /TN $t /Enable 2>$null | Out-Null } } } @{ Id = 'activity'; Cat = 'Privacy'; Risk = 'Safe'; Presets = 'd', 'p' Name = 'Activity History - Disable' Desc = 'Windows stops recording which apps, files and sites you open (Timeline).' Reg = @( (RegE 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\System' 'EnableActivityFeed' 0), (RegE 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\System' 'PublishUserActivities' 0), (RegE 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\System' 'UploadUserActivities' 0) ) } @{ Id = 'location'; Cat = 'Privacy'; Risk = 'Safe'; Presets = 'p' Name = 'Location Tracking - Disable' Desc = 'Denies location access to all apps and turns off the geolocation service.' Reg = @( (RegE 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location' 'Value' 'Deny' 'Allow' 'String'), (RegE 'HKLM:\SYSTEM\CurrentControlSet\Services\lfsvc\Service\Configuration' 'Status' 0 1) ) } @{ Id = 'adid'; Cat = 'Privacy'; Risk = 'Safe'; Presets = 'g', 'm', 'd', 'p' Name = 'Advertising ID - Disable' Desc = 'Apps can no longer use a unique ID to track you for personalised ads.' Reg = @( (RegE 'HKCU:\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo' 'Enabled' 0 1), (RegE 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo' 'DisabledByGroupPolicy' 1) ) } @{ Id = 'tailored'; Cat = 'Privacy'; Risk = 'Safe'; Presets = 'p' Name = 'Tailored Experiences - Disable' Desc = 'Microsoft stops using your diagnostic data to show personalised tips and ads.' Reg = @( (RegE 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Privacy' 'TailoredExperiencesWithDiagnosticDataEnabled' 0 1) ) } @{ Id = 'feedback'; Cat = 'Privacy'; Risk = 'Safe'; Presets = 'd', 'p' Name = 'Feedback Requests - Disable' Desc = 'No more "How likely are you to recommend Windows" pop-ups.' Reg = @( (RegE 'HKCU:\Software\Microsoft\Siuf\Rules' 'NumberOfSIUFInPeriod' 0) ) } @{ Id = 'inking'; Cat = 'Privacy'; Risk = 'Safe'; Presets = 'p' Name = 'Typing & Inking Data Collection - Disable' Desc = 'Stops collecting what you type and write to build a personal dictionary in the cloud.' Reg = @( (RegE 'HKCU:\Software\Microsoft\InputPersonalization' 'RestrictImplicitTextCollection' 1 0), (RegE 'HKCU:\Software\Microsoft\InputPersonalization' 'RestrictImplicitInkCollection' 1 0), (RegE 'HKCU:\Software\Microsoft\Personalization\Settings' 'AcceptedPrivacyPolicy' 0 1) ) } @{ Id = 'applaunch'; Cat = 'Privacy'; Risk = 'Safe'; Presets = 'p' Name = 'App Launch Tracking - Disable' Desc = 'Windows stops tracking which apps you launch to personalise Start and search.' Reg = @( (RegE $ADV 'Start_TrackProgs' 0 1) ) } # ------------------------------------------------------------------ MAINTENANCE (one-shot actions) @{ Id = 'temp'; Cat = 'Maintenance'; Risk = 'Safe'; Presets = 'g', 'm', 'd'; OneShot = $true Name = 'Temporary Files - Clean' Desc = 'Deletes the contents of your user Temp folder, Windows\Temp and the Prefetch cache.' Apply = { $before = (Get-PSDrive C).Free foreach ($p in "$env:TEMP\*", "$env:SystemRoot\Temp\*", "$env:SystemRoot\Prefetch\*") { Remove-Item -Path $p -Recurse -Force -ErrorAction SilentlyContinue } Write-Log (' freed {0:N0} MB' -f (((Get-PSDrive C).Free - $before) / 1MB)) 'ok' } } @{ Id = 'dnsflush'; Cat = 'Maintenance'; Risk = 'Safe'; Presets = 'g', 'm'; OneShot = $true Name = 'DNS Cache - Flush' Desc = 'Clears stale DNS entries - fixes "can not connect to server" after server IP changes.' Apply = { Clear-DnsClientCache; ipconfig /flushdns | Out-Null } } @{ Id = 'shadercache'; Cat = 'Maintenance'; Risk = 'Moderate'; OneShot = $true Name = 'GPU Shader Cache - Reset' Desc = 'Deletes NVIDIA/DirectX shader caches. Fixes stutter from a corrupted cache after driver updates. First launch of each game will rebuild shaders.' Apply = { foreach ($p in "$env:LOCALAPPDATA\NVIDIA\DXCache\*", "$env:LOCALAPPDATA\NVIDIA\GLCache\*", "$env:LOCALAPPDATA\D3DSCache\*", "$env:LOCALAPPDATA\AMD\DxCache\*", "$env:LOCALAPPDATA\NVIDIA Corporation\NV_Cache\*") { Remove-Item -Path $p -Recurse -Force -ErrorAction SilentlyContinue } } } @{ Id = 'trim'; Cat = 'Maintenance'; Risk = 'Safe'; Presets = 'g', 'm'; OneShot = $true Name = 'SSD TRIM - Run Now' Desc = 'Tells your SSD which blocks are free so writes stay fast.' Apply = { Get-Volume | Where-Object { $_.DriveLetter -and $_.DriveType -eq 'Fixed' } | ForEach-Object { Optimize-Volume -DriveLetter $_.DriveLetter -ReTrim -ErrorAction SilentlyContinue; Write-Log " trimmed $($_.DriveLetter):" } } } @{ Id = 'wucleanup'; Cat = 'Maintenance'; Risk = 'Safe'; OneShot = $true Name = 'Windows Update Leftovers - Clean (DISM)' Desc = 'Removes superseded update components from WinSxS. Can free several GB; takes a few minutes.' Apply = { Dism.exe /Online /Cleanup-Image /StartComponentCleanup 2>&1 | ForEach-Object { $l = "$_".Trim(); if ($l -match '\w' -and $l -notmatch '^\[') { Write-Log " $l" } } } } ) # ---------------------------------------------------------------- NVIDIA App / driver fixer $NvDir = Join-Path $DataDir 'nvidia' $NvApi = 'https://www.nvidia.com/Download/API/lookupValueSearch.aspx' $DriverSearchKey = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DriverSearching' $NvProcs = 'NVIDIA app', 'NVIDIA Overlay', 'NVIDIA Share', 'NVIDIA Web Helper', 'NVIDIA app SelfUpdate' function Get-NvGpu { Get-CimInstance Win32_VideoController | Where-Object { $_.Name -match 'NVIDIA' } | Select-Object -First 1 } function Convert-NvVersion([string]$V) { $d = $V -replace '\.', '' if ($d.Length -ge 5) { $x = $d.Substring($d.Length - 5); return '{0}.{1}' -f $x.Substring(0, 3), $x.Substring(3) } } function Get-NvAppInfo { $e = foreach ($k in 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*', 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*') { Get-ItemProperty $k -ErrorAction SilentlyContinue | Where-Object { $_.DisplayName -like 'NVIDIA app*' } } $e | Select-Object -First 1 } # NVIDIA's own product IDs for the driver lookup (series -> product), cached per GPU name function Find-NvProduct([string]$Name) { $cache = Join-Path $NvDir 'product.json' if (Test-Path $cache) { try { $c = Get-Content $cache -Raw | ConvertFrom-Json; if ($c.Name -eq $Name) { return @([int]$c.Psid, [int]$c.Pfid) } } catch {} } $laptop = [bool](@((Get-CimInstance Win32_SystemEnclosure).ChassisTypes) | Where-Object { $_ -in 8, 9, 10, 14, 31, 32 }) try { $series = ([xml](Invoke-WebRequest "$($NvApi)?TypeID=2&ParentID=1" -UseBasicParsing -TimeoutSec 25).Content).LookupValueSearch.LookupValues.LookupValue foreach ($s in $series) { if ($s.Name -notmatch 'RTX|GTX' -or (($s.Name -match 'Notebook') -ne $laptop)) { continue } $prods = ([xml](Invoke-WebRequest "$($NvApi)?TypeID=3&ParentID=$($s.Value)" -UseBasicParsing -TimeoutSec 25).Content).LookupValueSearch.LookupValues.LookupValue $hit = $prods | Where-Object { $_.Name -eq $Name -or "NVIDIA $($_.Name)" -eq $Name } | Select-Object -First 1 if ($hit) { New-Item -ItemType Directory -Path $NvDir -Force | Out-Null @{ Name = $Name; Psid = [int]$s.Value; Pfid = [int]$hit.Value } | ConvertTo-Json | Set-Content $cache return @([int]$s.Value, [int]$hit.Value) } } } catch { Write-Log " NVIDIA product lookup failed: $($_.Exception.Message)" 'warn' } if ($Name -eq 'NVIDIA GeForce RTX 4070') { return @(127, 1015) } } function Get-NvLatest([string]$GpuName) { $p = Find-NvProduct $GpuName if (-not $p) { return $null } $os = if ([int](Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion').CurrentBuild -ge 22000) { 135 } else { 57 } $u = "https://gfwsl.geforce.com/services_toolkit/services/com/nvidia/services/AjaxDriverService.php?func=DriverManualLookup&psid=$($p[0])&pfid=$($p[1])&osID=$os&languageCode=1033&beta=0&isWHQL=1&dltype=-1&dch=1&upCRD=0&qnf=0&sort1=0&numberOfResults=1" try { $i = (Invoke-RestMethod $u -TimeoutSec 25).IDS[0].downloadInfo if ($i.DownloadURL -notmatch '^https://[a-z0-9\.]*nvidia\.com/') { throw "unexpected download host: $($i.DownloadURL)" } [pscustomobject]@{ Version = "$($i.Version)"; Url = $i.DownloadURL; Date = $i.ReleaseDateTime; Size = $i.DownloadURLFileSize } } catch { Write-Log " could not get the latest driver from NVIDIA: $($_.Exception.Message)" 'warn'; $null } } function Get-NvStatus { $g = Get-NvGpu $app = Get-NvAppInfo $svc = @(Get-Service -ErrorAction SilentlyContinue | Where-Object { $_.Name -like 'NVDisplay.Container*' -or $_.Name -like 'NvContainer*' }) [pscustomobject]@{ GpuName = if ($g) { $g.Name } else { $null } Installed = if ($g) { Convert-NvVersion $g.DriverVersion } else { $null } DriverDate = if ($g -and $g.DriverDate) { $g.DriverDate.ToString('yyyy-MM-dd') } else { '' } Latest = if ($g) { Get-NvLatest $g.Name } else { $null } AppVersion = if ($app) { "$($app.DisplayVersion)" } else { $null } SvcTotal = $svc.Count SvcRunning = @($svc | Where-Object Status -eq 'Running').Count } } function Clear-NvCaches { $freed = 0 foreach ($p in "$env:ProgramData\NVIDIA Corporation\Downloader", "$env:LOCALAPPDATA\NVIDIA Corporation\NVIDIA app\CefCache", "$env:LOCALAPPDATA\NVIDIA Corporation\NVIDIA app\GPUCache", "$env:SystemDrive\NVIDIA\DisplayDriver") { if (Test-Path $p) { $freed += (Get-ChildItem $p -Recurse -Force -File -ErrorAction SilentlyContinue | Measure-Object Length -Sum).Sum Remove-Item "$p\*" -Recurse -Force -ErrorAction SilentlyContinue Write-Log " cleared $p" } } Write-Log (' freed {0:N0} MB of NVIDIA caches' -f ($freed / 1MB)) 'ok' } function Stop-NvApp { Get-Process -Name $NvProcs -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue } function Restart-NvServices { foreach ($s in @(Get-Service -ErrorAction SilentlyContinue | Where-Object { $_.Name -like 'NVDisplay.Container*' -or $_.Name -like 'NvContainer*' })) { try { if ($s.Status -eq 'Running') { Restart-Service $s.Name -Force -ErrorAction Stop; Write-Log " restarted $($s.Name)" } elseif ([string]$s.StartType -ne 'Disabled') { Start-Service $s.Name -ErrorAction Stop; Write-Log " started $($s.Name)" } } catch { Write-Log " ! $($s.Name): $($_.Exception.Message)" 'warn' } } } function Save-NvDriver($Latest) { New-Item -ItemType Directory -Path $NvDir -Force | Out-Null $file = Join-Path $NvDir ([IO.Path]::GetFileName(([uri]$Latest.Url).AbsolutePath)) if ((Test-Path $file) -and (Get-AuthenticodeSignature $file).Status -eq 'Valid') { Write-Log " driver $($Latest.Version) already downloaded"; return $file } Get-ChildItem $NvDir -Filter '*.exe' -ErrorAction SilentlyContinue | Remove-Item -Force -ErrorAction SilentlyContinue $Sync.NvPhase = "Downloading GeForce driver $($Latest.Version) ($($Latest.Size)) from nvidia.com" Write-Log "$($Sync.NvPhase)..." $Sync.NvProgress = 0 try { Import-Module BitsTransfer -ErrorAction Stop $job = Start-BitsTransfer -Source $Latest.Url -Destination $file -Asynchronous -Priority Foreground -DisplayName 'PanosOptimizationTool NVIDIA driver' -ErrorAction Stop $last = 0 while ("$($job.JobState)" -in 'Queued', 'Connecting', 'Transferring', 'TransientError') { Start-Sleep -Milliseconds 700 if ($job.BytesTotal -gt 0 -and $job.BytesTotal -lt [uint64]::MaxValue) { $pct = [int](100 * $job.BytesTransferred / $job.BytesTotal); $Sync.NvProgress = $pct if ($pct -ge $last + 10) { $last = $pct - ($pct % 10); Write-Log " $pct% downloaded" } } } if ("$($job.JobState)" -eq 'Transferred') { Complete-BitsTransfer $job } else { $st = $job.JobState; Remove-BitsTransfer $job; throw "BITS ended with state $st" } } catch { Write-Log " background download failed ($($_.Exception.Message)) - trying direct download..." 'warn' Invoke-WebRequest $Latest.Url -OutFile $file -UseBasicParsing } $Sync.NvProgress = 100 $sig = Get-AuthenticodeSignature $file if ($sig.Status -ne 'Valid' -or $sig.SignerCertificate.Subject -notmatch 'NVIDIA') { Remove-Item $file -Force -ErrorAction SilentlyContinue throw 'The downloaded file is not a valid NVIDIA-signed installer - stopped for safety.' } Write-Log ' download verified: signed by NVIDIA' 'ok' $file } # extracts the package with 7-Zip when available (most reliable silent install), otherwise uses the .exe directly function Get-NvSetup([string]$File) { $ex = Join-Path $NvDir 'extracted' Remove-Item $ex -Recurse -Force -ErrorAction SilentlyContinue $7z = @("$env:ProgramFiles\7-Zip\7z.exe", "${env:ProgramFiles(x86)}\7-Zip\7z.exe") | Where-Object { Test-Path $_ } | Select-Object -First 1 if ($7z) { $Sync.NvPhase = 'Unpacking the driver package'; Write-Log ' unpacking driver package with 7-Zip...' & $7z x $File "-o$ex" -y | Out-Null if (Test-Path "$ex\setup.exe") { return "$ex\setup.exe" } } $File } function Install-NvDriver([string]$Setup) { Stop-NvApp $prev = Get-Reg $DriverSearchKey 'SearchOrderConfig' Set-Reg $DriverSearchKey 'SearchOrderConfig' 0 # stop Windows Update pushing its own driver mid-install $Sync.NvPhase = 'Installing the driver (clean install) - the screen will go black and flicker, this is normal'; $Sync.NvIndeterminate = $true Write-Log 'Removing the old driver and installing the new one (clean install, 3-10 minutes)...' $p = Start-Process -FilePath $Setup -ArgumentList '-s', '-clean', '-noreboot', '-noeula' -PassThru -Wait $Sync.NvIndeterminate = $false if ($null -eq $prev) { Remove-Reg $DriverSearchKey 'SearchOrderConfig' } else { Set-Reg $DriverSearchKey 'SearchOrderConfig' $prev } Write-Log (" NVIDIA setup finished with exit code {0}" -f $p.ExitCode) $(if ($p.ExitCode -in 0, 1) { 'ok' } else { 'warn' }) $p.ExitCode } function Install-NvApp { if (-not (Get-Command winget -ErrorAction SilentlyContinue)) { Write-Log ' winget not found - install the NVIDIA App from nvidia.com/en-us/software/nvidia-app/' 'warn'; return } $Sync.NvPhase = 'Installing the NVIDIA App'; Write-Log 'Installing a fresh NVIDIA App...' $out = & winget install --id XP8CLZL93F5Z4P --source msstore -e --accept-package-agreements --accept-source-agreements --disable-interactivity 2>&1 foreach ($l in $out) { $t = ("$l" -replace '[\u2580-\u259F\u2500-\u257F]', '').Trim(); if ($t.Length -gt 3 -and $t -notmatch '^[\-\\|/\s]+$' -and $t -notmatch '\d\s*(KB|MB|GB)\s*/') { Write-Log " $t" } } } function Uninstall-NvApp { $a = Get-NvAppInfo if (-not $a) { return } $Sync.NvPhase = 'Removing the broken NVIDIA App'; Write-Log 'Removing the NVIDIA App...' Stop-NvApp & winget uninstall --name 'NVIDIA app' --silent --accept-source-agreements --disable-interactivity 2>&1 | Out-Null if (Get-NvAppInfo) { Write-Log ' winget could not remove it - the clean driver install will replace it' 'warn' } else { Write-Log ' NVIDIA App removed' 'ok' } } # ---------------------------------------------------------------- tweak engine function Get-TweakState($T) { if ($T.OneShot) { return 'na' } try { if ($T.Detect) { if (& $T.Detect) { return 'on' } else { return 'off' } } if ($T.Reg) { if (Test-RegList $T.Reg) { return 'on' } else { return 'off' } } } catch {} return 'na' } function Get-AllStates { $h = @{}; foreach ($t in $Tweaks) { $h[$t.Id] = Get-TweakState $t }; $h } function Invoke-Tweak($T, [switch]$Undo) { if ($Undo -and ($T.OneShot -or $T.NoUndo)) { Write-Log "Skip undo: $($T.Name) (one-way action)" 'warn'; return } Write-Log ($(if ($Undo) { 'Undo : ' } else { 'Apply : ' }) + $T.Name) try { if ($T.Reg) { foreach ($r in $T.Reg) { if ($Undo) { if ($null -ne $r.D) { Set-Reg $r.P $r.N $r.D $r.T } else { Remove-Reg $r.P $r.N } } else { Set-Reg $r.P $r.N $r.V $r.T } } } $sb = if ($Undo) { $T.Undo } else { $T.Apply } if ($sb) { & $sb } Write-Log ' ok' 'ok' } catch { Write-Log " failed: $($_.Exception.Message)" 'error'; if ($Sync) { $Sync.WarnCount = [int]$Sync.WarnCount + 1 } } } # ---------------------------------------------------------------- displays (every monitor, real mode + max refresh) function Get-Monitors { if (-not ('PanosDisplay' -as [type])) { Add-Type -TypeDefinition @' using System; using System.Collections.Generic; using System.Runtime.InteropServices; public class PanosDisplay { [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public struct DISPLAY_DEVICE { public int cb; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] public string DeviceName; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)] public string DeviceString; public int StateFlags; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)] public string DeviceID; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 128)] public string DeviceKey; } [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] public struct DEVMODE { [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] public string dmDeviceName; public short dmSpecVersion; public short dmDriverVersion; public short dmSize; public short dmDriverExtra; public int dmFields; public int dmPositionX; public int dmPositionY; public int dmDisplayOrientation; public int dmDisplayFixedOutput; public short dmColor; public short dmDuplex; public short dmYResolution; public short dmTTOption; public short dmCollate; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] public string dmFormName; public short dmLogPixels; public int dmBitsPerPel; public int dmPelsWidth; public int dmPelsHeight; public int dmDisplayFlags; public int dmDisplayFrequency; public int dmICMMethod; public int dmICMIntent; public int dmMediaType; public int dmDitherType; public int dmReserved1; public int dmReserved2; public int dmPanningWidth; public int dmPanningHeight; } [DllImport("user32.dll", CharSet = CharSet.Unicode)] static extern bool EnumDisplayDevices(string lpDevice, uint iDevNum, ref DISPLAY_DEVICE dd, uint flags); [DllImport("user32.dll", CharSet = CharSet.Unicode)] static extern bool EnumDisplaySettings(string name, int mode, ref DEVMODE dm); // device|adapter|curW|curH|curHz|maxHzAtCurrentRes|nativeW|nativeH|maxHzAtNative|primary|monitorName|monitorId|posX public static List Get() { var res = new List(); for (uint i = 0; ; i++) { var a = new DISPLAY_DEVICE(); a.cb = Marshal.SizeOf(a); if (!EnumDisplayDevices(null, i, ref a, 0)) break; if ((a.StateFlags & 1) == 0) continue; var cur = new DEVMODE(); cur.dmSize = (short)Marshal.SizeOf(cur); if (!EnumDisplaySettings(a.DeviceName, -1, ref cur)) continue; int maxHzCur = 0, nW = 0, nH = 0, maxHzNat = 0; for (int m = 0; ; m++) { var d = new DEVMODE(); d.dmSize = (short)Marshal.SizeOf(d); if (!EnumDisplaySettings(a.DeviceName, m, ref d)) break; if (d.dmPelsWidth == cur.dmPelsWidth && d.dmPelsHeight == cur.dmPelsHeight && d.dmDisplayFrequency > maxHzCur) maxHzCur = d.dmDisplayFrequency; if ((long)d.dmPelsWidth * d.dmPelsHeight > (long)nW * nH) { nW = d.dmPelsWidth; nH = d.dmPelsHeight; maxHzNat = 0; } if (d.dmPelsWidth == nW && d.dmPelsHeight == nH && d.dmDisplayFrequency > maxHzNat) maxHzNat = d.dmDisplayFrequency; } var mon = new DISPLAY_DEVICE(); mon.cb = Marshal.SizeOf(mon); string mName = "", mId = ""; if (EnumDisplayDevices(a.DeviceName, 0, ref mon, 1)) { mName = mon.DeviceString; mId = mon.DeviceID; } res.Add(string.Join("|", new string[] { a.DeviceName, a.DeviceString, cur.dmPelsWidth.ToString(), cur.dmPelsHeight.ToString(), cur.dmDisplayFrequency.ToString(), maxHzCur.ToString(), nW.ToString(), nH.ToString(), maxHzNat.ToString(), ((a.StateFlags & 4) != 0 ? "1" : "0"), mName, mId, cur.dmPositionX.ToString() })); } return res; } } '@ } # monitor model names, connection type and size come from the monitor's own EDID (root\wmi) $ids = @{}; $conn = @{}; $size = @{} try { Get-CimInstance -Namespace root\wmi -ClassName WmiMonitorID -ErrorAction Stop | ForEach-Object { $ids[$_.InstanceName] = (-join ($_.UserFriendlyName | Where-Object { $_ } | ForEach-Object { [char]$_ })).Trim() } Get-CimInstance -Namespace root\wmi -ClassName WmiMonitorConnectionParams -ErrorAction SilentlyContinue | ForEach-Object { $conn[$_.InstanceName] = [int64]$_.VideoOutputTechnology } Get-CimInstance -Namespace root\wmi -ClassName WmiMonitorBasicDisplayParams -ErrorAction SilentlyContinue | ForEach-Object { if ($_.MaxHorizontalImageSize -gt 0) { $size[$_.InstanceName] = [math]::Round([math]::Sqrt([math]::Pow($_.MaxHorizontalImageSize, 2) + [math]::Pow($_.MaxVerticalImageSize, 2)) / 2.54) } } } catch {} $list = foreach ($line in [PanosDisplay]::Get()) { $f = $line -split '\|' $key = if ($f[11] -match '^\\\\\?\\DISPLAY#([^#]+)#([^#]+)#') { "DISPLAY\$($matches[1])\$($matches[2])" } else { '' } $inst = if ($key) { $ids.Keys | Where-Object { $_.StartsWith($key, [StringComparison]::OrdinalIgnoreCase) } | Select-Object -First 1 } else { $null } $name = if ($inst -and $ids[$inst]) { $ids[$inst] } elseif ($f[10] -and $f[10] -notmatch 'Generic') { $f[10] } else { 'Monitor' } $c = if ($inst -and $conn.ContainsKey($inst)) { $conn[$inst] } else { $null } [pscustomobject]@{ Name = $name; Gpu = $f[1]; Width = [int]$f[2]; Height = [int]$f[3]; Hz = [int]$f[4]; MaxHz = [int]$f[5] NativeW = [int]$f[6]; NativeH = [int]$f[7]; NativeHz = [int]$f[8]; Primary = ($f[9] -eq '1'); PosX = [int]$f[12] Conn = if ($null -eq $c) { '' } else { switch ([int64]$c) { 0 { 'VGA' } 4 { 'DVI' } 5 { 'HDMI' } 6 { 'Built-in (LVDS)' } 10 { 'DisplayPort' } 11 { 'Built-in screen' } 15 { 'Wireless' } 16 { 'USB-C / dock' } 2147483648 { 'Built-in screen' } default { '' } } } Inches = if ($inst -and $size.ContainsKey($inst)) { $size[$inst] } else { $null } Internal = ($null -ne $c -and ([int64]$c -eq 2147483648 -or [int64]$c -eq 11 -or [int64]$c -eq 6)) } } $i = 0 foreach ($m in @($list | Sort-Object { -not $_.Primary }, PosX)) { $i++; $m | Add-Member -NotePropertyName Index -NotePropertyValue $i -PassThru | Add-Member -NotePropertyName Label -NotePropertyValue "Display $i" -PassThru } } # ---------------------------------------------------------------- graphics cards by vendor function Get-GpuList { @(Get-CimInstance Win32_VideoController -ErrorAction SilentlyContinue | Where-Object { $_.Name -notmatch 'Basic|Remote|Virtual|Parsec|Meta|Mirage|DisplayLink|Citrix' } | ForEach-Object { $n = $_.Name $v = if ($n -match 'NVIDIA|GeForce|Quadro') { 'NVIDIA' } elseif ($n -match 'AMD|Radeon|ATI ') { 'AMD' } elseif ($n -match 'Intel') { 'Intel' } else { 'Other' } $disc = switch ($v) { 'NVIDIA' { $true } 'AMD' { $n -match 'Radeon\s*(\(TM\)\s*)?(RX|Pro|R9|R7|HD)\s' -or $n -match 'Radeon RX' } 'Intel' { $n -match 'Arc\(TM\)\s*[AB]\d|Arc [AB]\d' } default { $false } } [pscustomobject]@{ Name = $n; Vendor = $v; Discrete = [bool]$disc; Driver = $_.DriverVersion; DriverDate = $(if ($_.DriverDate) { $_.DriverDate.ToString('yyyy-MM-dd') } else { '' }) } }) } # ---------------------------------------------------------------- memory advice that matches the actual CPU / PC function Get-MemoryAdvice($s) { if ($s.IsLaptop) { return @{ Applies = $false; Note = 'Laptop memory runs at the speed the manufacturer set - there is no XMP/EXPO to turn on.' } } $gamingOem = $s.Model -match 'Alienware|Aurora|OMEN|Legion|Predator|ROG|TUF|Nitro|XPS 8\d{3}' if ($s.Maker -match 'Dell|HP|Hewlett|Lenovo|Acer|Fujitsu|Medion|Microsoft|Samsung|Toshiba|Packard|Wortmann|Terra' -and -not $gamingOem) { return @{ Applies = $false; Note = "$($s.Maker) office/home desktops lock memory speed in the BIOS - nothing to change." } } if ($s.CpuName -match 'AMD') { if ($s.RamType -eq 'DDR5') { return @{ Applies = $true; Target = 5600; Profile = 'EXPO'; Sweet = 'DDR5-6000'; Why = 'Ryzen 7000/8000/9000 CPUs run best with DDR5-6000: the memory controller and Infinity Fabric are tuned for it.' } } return @{ Applies = $true; Target = 3200; Profile = 'DOCP / XMP'; Sweet = 'DDR4-3200 to 3600'; Why = 'Ryzen CPUs on DDR4 run best around DDR4-3600 because the Infinity Fabric runs in sync with the memory.' } } if ($s.CpuName -match 'Intel') { if ($s.RamType -eq 'DDR5') { return @{ Applies = $true; Target = 5600; Profile = 'XMP'; Sweet = 'DDR5-6000 to 6400'; Why = 'Intel 12th-14th gen and Core Ultra CPUs gain a lot from fast DDR5 - XMP runs your kit at its rated speed.' } } return @{ Applies = $true; Target = 2933; Profile = 'XMP'; Sweet = 'DDR4-3200 to 3600'; Why = 'Without XMP, DDR4 runs at a slow 2133-2666 MT/s default. (On older Intel H/B chipsets the limit can be 2666-2933.)' } } @{ Applies = $false; Note = '' } } # ---------------------------------------------------------------- installed-program helpers (Dell clean-up, GPU tools) $UninstallKeys = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\*', 'HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*', 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*' function Get-ArpAll { @(foreach ($k in $UninstallKeys) { Get-ItemProperty $k -ErrorAction SilentlyContinue | Where-Object { $_.DisplayName } }) } function Find-Arp($All, [string[]]$Patterns) { if (-not $Patterns) { return @() } @($All | Where-Object { $n = $_.DisplayName; [bool]($Patterns | Where-Object { $n -match $_ }) }) } function Get-AppxAll { try { @(Get-AppxPackage -AllUsers -ErrorAction Stop) } catch { @(Get-AppxPackage -ErrorAction SilentlyContinue) } } function Find-Appx($All, [string[]]$Names) { if (-not $Names) { return @() } @($All | Where-Object { $nm = $_.Name; [bool]($Names | Where-Object { $nm -like $_ }) }) } function Open-Url([string]$Url) { Start-Process explorer.exe $Url } # explorer hands it to the normal (non-admin) browser function Uninstall-ArpEntry($E) { $name = $E.DisplayName; $u = "$($E.UninstallString)"; $q = "$($E.QuietUninstallString)" Write-Log " uninstalling $name..." try { if ($u -match 'OfficeClickToRun\.exe') { $p = Start-Process cmd.exe -ArgumentList "/c `"$u DisplayLevel=False`"" -Wait -PassThru -WindowStyle Hidden } elseif ($E.PSChildName -match '^\{[0-9A-Fa-f\-]{36}\}$' -and ($u -match 'msiexec' -or $E.WindowsInstaller -eq 1)) { $p = Start-Process msiexec.exe -ArgumentList "/x $($E.PSChildName) /qn /norestart" -Wait -PassThru } elseif ($q) { $p = Start-Process cmd.exe -ArgumentList "/c `"$q`"" -Wait -PassThru -WindowStyle Hidden } else { & winget uninstall --name $name --exact --silent --force --accept-source-agreements --disable-interactivity 2>&1 | Out-Null if ($LASTEXITCODE -eq 0) { Write-Log " removed $name" 'ok'; return $true } if (-not $u) { Write-Log " $name has no uninstaller entry" 'warn'; return $false } Write-Log " $name has no silent uninstaller - its own window opens now, please click through it" 'warn' $p = Start-Process cmd.exe -ArgumentList "/c `"$u`"" -Wait -PassThru } if ($p.ExitCode -in 0, 3010, 1605, 1614, 1641) { Write-Log " removed $name" 'ok'; return $true } Write-Log (" {0}: uninstaller ended with code {1}" -f $name, $p.ExitCode) 'warn'; return $false } catch { Write-Log " $name : $($_.Exception.Message)" 'warn'; return $false } } # ---------------------------------------------------------------- Dell clean-up catalog # Action: remove (default) | install (winget) | open (web page) | services (disable Dell background services) $DellItems = @( @{ Id = 'd-sa'; Cat = 'Dell software'; Risk = 'Safe'; Rec = $true; Name = 'Dell SupportAssist (all parts)' Desc = 'SupportAssist, its Remediation service, OS Recovery plugin and agent. Runs scans and pop-ups in the background. Dell Command | Update (below) is a lighter way to get drivers.' Arp = '^Dell SupportAssist', '^SupportAssist'; Appx = 'DellInc.DellSupportAssistforPCs' } @{ Id = 'd-dd'; Cat = 'Dell software'; Risk = 'Safe'; Rec = $true; Name = 'Dell Digital Delivery' Desc = 'Only used once to download software bought with the PC. Keeps a service running forever.' Arp = '^Dell Digital Delivery'; Appx = 'DellInc.DellDigitalDelivery' } @{ Id = 'd-mydell'; Cat = 'Dell software'; Risk = 'Safe'; Rec = $true; Name = 'My Dell / Dell Customer Connect / Partner Promo' Desc = 'Dell hub app, surveys and partner offers.' Arp = '^My Dell', '^Dell Customer Connect'; Appx = 'DellInc.MyDell', 'DellInc.DellCustomerConnect', 'DellInc.PartnerPromo' } @{ Id = 'd-opt'; Cat = 'Dell software'; Risk = 'Moderate'; Rec = $true; Name = 'Dell Optimizer' Desc = 'AI "optimization", presence detection and app learning services that use CPU in the background. Remove unless you use its features.' Arp = '^Dell Optimizer', '^Dell Precision Optimizer'; Appx = 'DellInc.DellOptimizer' } @{ Id = 'd-update'; Cat = 'Dell software'; Risk = 'Safe'; Rec = $true; Name = 'Dell Update (old consumer version)' Desc = 'Older Dell updater. Replace it with Dell Command | Update from the Install section.' Arp = '^Dell Update'; Appx = 'DellInc.DellUpdate' } @{ Id = 'd-core'; Cat = 'Dell software'; Risk = 'Safe'; Rec = $true; Name = 'Dell Core Services / TechHub / Data Vault' Desc = 'Background telemetry and "health" services used by SupportAssist and My Dell.' Arp = '^Dell Core Services', '^Dell TechHub', '^Dell Data Vault', '^Dell Trusted Device', '^Dell Security Advisor' } @{ Id = 'd-pair'; Cat = 'Dell software'; Risk = 'Safe'; Rec = $true; Name = 'Dell Pair / Dell Mobile Connect' Desc = 'Phone and peripheral pairing helpers. Windows Bluetooth and Phone Link do the same.' Arp = '^Dell Pair', '^Dell Mobile Connect'; Appx = 'ScreenovateTechnologies.DellMobileConnect', 'DellInc.DellMobileConnect' } @{ Id = 'd-cinema'; Cat = 'Dell software'; Risk = 'Safe'; Rec = $true; Name = 'Dell CinemaColor / Cinema Guide' Desc = 'Colour profile and movie-guide apps from Dell.' Arp = '^Dell CinemaColor', '^Dell Cinema'; Appx = 'DellInc.DellCinemaGuide', 'PortraitDisplays.DellCinemaColor' } @{ Id = 'd-power'; Cat = 'Dell software'; Risk = 'Moderate'; Name = 'Dell Power Manager' Desc = 'Laptops: battery charge limits and thermal modes. Keep it if you use those settings (they can also be set in the BIOS).' Arp = '^Dell Power Manager', '^Dell Command \| Power Manager'; Appx = 'DellInc.DellPowerManager' } @{ Id = 'd-periph'; Cat = 'Dell software'; Risk = 'Moderate'; Name = 'Dell Display / Peripheral Manager' Desc = 'Only needed for Dell monitors, keyboards and mice settings.' Arp = '^Dell Display Manager', '^Dell Peripheral Manager', '^Dell Display and Peripheral Manager' } @{ Id = 'd-killer'; Cat = 'Dell software'; Risk = 'Moderate'; Name = 'Killer Intelligence / Control Center' Desc = 'XPS / Alienware network "prioritisation" app. Often causes lag spikes - the network driver stays installed.' Arp = '^Killer Intelligence Center', '^Killer Control Center'; Appx = 'RivetNetworks.KillerControlCenter' } @{ Id = 'd-svc'; Cat = 'Dell software'; Risk = 'Moderate'; Action = 'services'; Name = 'Dell background services - Disable' Desc = 'Disables Dell Data Vault, TechHub and SupportAssist background services that stay behind. Can be undone.' Services = 'Dell Data Vault*', 'Dell TechHub*', 'Dell SupportAssist*', 'Dell Digital Delivery*' } @{ Id = 'x-mcafee'; Cat = 'Pre-installed extras'; Risk = 'Safe'; Rec = $true; Name = 'McAfee (LiveSafe, WebAdvisor, Security Scan)' Desc = 'Trial antivirus. Windows Security (Defender) takes over automatically. McAfee may open its own uninstall window - click through it.' Arp = '^McAfee'; Appx = '5A894077.McAfeeSecurity' } @{ Id = 'x-norton'; Cat = 'Pre-installed extras'; Risk = 'Safe'; Rec = $true; Name = 'Norton (trial)' Desc = 'Trial antivirus. Windows Security takes over automatically. Norton opens its own uninstall window.' Arp = '^Norton'; Appx = 'NortonLifeLock*' } @{ Id = 'x-office'; Cat = 'Pre-installed extras'; Risk = 'Advanced'; Name = 'Microsoft 365 / Office (pre-installed, all languages)' Desc = 'Removes the pre-installed Office trial (Word, Excel, PowerPoint, Outlook). ONLY if you do not use Office - documents are kept.' Arp = '^Microsoft 365', '^Microsoft Office'; Appx = 'Microsoft.MicrosoftOfficeHub', 'Microsoft.Office.Desktop*' } @{ Id = 'x-onenote'; Cat = 'Pre-installed extras'; Risk = 'Moderate'; Name = 'Microsoft OneNote (pre-installed)' Desc = 'Pre-installed OneNote in every language. Notes already synced to OneDrive are kept online.' Arp = '^Microsoft OneNote'; Appx = 'Microsoft.Office.OneNote' } @{ Id = 'x-promo'; Cat = 'Pre-installed extras'; Risk = 'Safe'; Rec = $true; Name = 'Promo apps (Netflix, Prime Video, Disney+, Booking, ExpressVPN...)' Desc = 'Store apps and trials installed by the factory image. Spotify and Dropbox you installed yourself are kept.' Arp = '^ExpressVPN', '^WildTangent', '^Booking\.com' Appx = '4DF9E0F8.Netflix', 'AmazonVideo.PrimeVideo', 'Disney.37853FC22B2CE', 'PricelinePartnerNetwork.Booking.com*', 'king.com.*', 'Amazon.com.Amazon', 'BytedancePte.Ltd.TikTok', 'Facebook.*', 'C27EB4BA.DropboxOEM*', '*ExpressVPN*', 'WildTangentGames.*' } @{ Id = 'i-dcu'; Cat = 'Install Dell tools'; Risk = 'Safe'; Action = 'install'; Winget = 'Dell.CommandUpdate'; RecInstall = $true; Name = 'Dell Command | Update' Desc = 'Light official tool that installs Dell drivers and BIOS updates for this exact PC. Best for OptiPlex, Latitude, Precision, XPS and Vostro.' Arp = '^Dell Command \| Update' } @{ Id = 'i-sa'; Cat = 'Install Dell tools'; Risk = 'Safe'; Action = 'open'; Url = 'https://www.dell.com/support/contents/en-us/article/product-support/self-support-knowledgebase/software-and-downloads/supportassist'; Name = 'Dell SupportAssist (official download page)' Desc = 'For Inspiron, G-series and Alienware owners who want Dell hardware scans and warranty help. Opens Dell''s download page.' Arp = '^Dell SupportAssist' } @{ Id = 'i-drivers'; Cat = 'Install Dell tools'; Risk = 'Safe'; Action = 'open'; Url = 'https://www.dell.com/support/home/en-us/product-support/servicetag/{TAG}/drivers'; Name = 'Drivers & BIOS for THIS PC (Dell website, by Service Tag)' Desc = 'Opens Dell''s driver page already set to your Service Tag - no searching for the model.' } @{ Id = 'i-ddpm'; Cat = 'Install Dell tools'; Risk = 'Safe'; Action = 'install'; Winget = 'Dell.DisplayAndPeripheralManager'; Name = 'Dell Display and Peripheral Manager' Desc = 'Settings app for Dell monitors, keyboards, mice and webcams.' Arp = '^Dell Display and Peripheral Manager', '^Dell Display Manager' } @{ Id = 'i-opt'; Cat = 'Install Dell tools'; Risk = 'Safe'; Action = 'install'; Winget = 'Dell.Optimizer'; Name = 'Dell Optimizer' Desc = 'If you removed it and want it back (presence detection, audio and battery features on newer Latitude/XPS).' Arp = '^Dell Optimizer' } @{ Id = 'i-cfg'; Cat = 'Install Dell tools'; Risk = 'Safe'; Action = 'install'; Winget = 'Dell.CommandConfigure'; Name = 'Dell Command | Configure' Desc = 'Advanced: change BIOS settings from Windows (business PCs).' Arp = '^Dell Command \| Configure' } ) function Get-DellStates { $arp = Get-ArpAll; $apx = Get-AppxAll $h = @{} foreach ($it in $DellItems) { $found = (Find-Arp $arp $it.Arp).Count + (Find-Appx $apx $it.Appx).Count $h[$it.Id] = switch ($it.Action) { 'install' { if ($found) { 'installed' } else { 'missing' } } 'open' { if ($it.Arp -and $found) { 'installed' } else { 'web' } } 'services' { $sv = @(Get-Service -DisplayName $it.Services -ErrorAction SilentlyContinue); if (-not $sv.Count) { 'none' } elseif (-not ($sv | Where-Object { "$($_.StartType)" -ne 'Disabled' })) { 'disabled' } else { 'active' } } default { if ($found) { 'found' } else { 'none' } } } } $h } function Invoke-DellItem($It) { switch ($It.Action) { 'install' { Write-Log "Installing $($It.Name)..." $out = & winget install --id $It.Winget -e --source winget --accept-package-agreements --accept-source-agreements --disable-interactivity -h 2>&1 if ($LASTEXITCODE -eq 0 -or $LASTEXITCODE -eq -1978335189) { Write-Log " $($It.Name) installed" 'ok'; return $true } Write-Log (" winget exit code 0x{0:X8}" -f $LASTEXITCODE) 'warn'; return $false } 'services' { $sv = @(Get-Service -DisplayName $It.Services -ErrorAction SilentlyContinue) if (-not $sv.Count) { Write-Log ' no Dell background services found' 'ok'; return $true } Save-ServiceState ($sv | ForEach-Object { $_.Name }); Set-Svc ($sv | ForEach-Object { $_.Name }) 'Disabled'; return $true } default { Write-Log "Removing $($It.Name)..." $ok = $true # helper parts first (Remediation, Agent, Plugin...), the main app last foreach ($e in @(Find-Arp (Get-ArpAll) $It.Arp | Sort-Object @{ e = { $_.DisplayName -notmatch 'Remediation|Agent|Plugin|Service|WebAdvisor' }; a = $true }, @{ e = { $_.DisplayName.Length }; d = $true })) { if (-not (Uninstall-ArpEntry $e)) { $ok = $false } } foreach ($a in @(Find-Appx (Get-AppxAll) $It.Appx)) { try { Remove-AppxPackage -Package $a.PackageFullName -AllUsers -ErrorAction Stop; Write-Log " removed app $($a.Name)" 'ok' } catch { try { Remove-AppxPackage -Package $a.PackageFullName -ErrorAction Stop; Write-Log " removed app $($a.Name)" 'ok' } catch { Write-Log " $($a.Name): $($_.Exception.Message)" 'warn'; $ok = $false } } } if ($It.Appx) { Get-AppxProvisionedPackage -Online -ErrorAction SilentlyContinue | Where-Object { $dn = $_.DisplayName; [bool]($It.Appx | Where-Object { $dn -like $_ }) } | Remove-AppxProvisionedPackage -Online -ErrorAction SilentlyContinue | Out-Null } $left = (Find-Arp (Get-ArpAll) $It.Arp).Count if ($left) { Write-Log " $left part(s) of $($It.Name) are still installed" 'warn'; $ok = $false } return $ok } } } # ---------------------------------------------------------------- AMD / Intel graphics fixer $GpuVendorInfo = @{ AMD = @{ Software = '^AMD Software', '^AMD Radeon Software', '^AMD Settings' Procs = 'RadeonSoftware', 'AMDRSServ', 'AMDRSSrcExt', 'cncmd', 'amdow', 'AMDRSSrcExt' Services = 'AMD External Events Utility', 'AMD Crash Defender Service' Caches = "$env:LOCALAPPDATA\AMD\DxCache", "$env:LOCALAPPDATA\AMD\DxcCache", "$env:LOCALAPPDATA\AMD\VkCache", "$env:LOCALAPPDATA\AMD\GLCache", "$env:LOCALAPPDATA\AMD\OglCache", "$env:LOCALAPPDATA\D3DSCache", "$env:SystemDrive\AMD" App = "$env:ProgramFiles\AMD\CNext\CNext\RadeonSoftware.exe" DriverPage = 'https://www.amd.com/en/support/download/drivers.html' DduArg = '-cleanamd' } Intel = @{ Software = '^Intel\(R\) Graphics Software', '^Intel.*Arc.*Control', '^Intel\(R\) Graphics Command Center', '^Intel.*Driver & Support Assistant' Procs = 'IntelGraphicsSoftware', 'ArcControl', 'IGCC', 'IGCCTray', 'IntelGraphicsSoftware.Service' Services = 'Intel(R) Graphics Command Center Service', 'Intel(R) Graphics Software*', 'Intel(R) Arc*', 'Intel(R) HD Graphics Control Panel Service' Caches = "$env:LOCALAPPDATA\Intel\ShaderCache", "$env:LOCALAPPDATA\D3DSCache", "$env:SystemDrive\Intel\GFX" App = '' DriverPage = 'https://www.intel.com/content/www/us/en/support/detect.html' DduArg = '-cleanintel' } } function Get-VendorGpuStatus([string]$Vendor) { $g = Get-GpuList | Where-Object Vendor -eq $Vendor | Sort-Object { -not $_.Discrete } | Select-Object -First 1 $sw = Find-Arp (Get-ArpAll) $GpuVendorInfo[$Vendor].Software | Select-Object -First 1 $idsa = Find-Arp (Get-ArpAll) @('Driver & Support Assistant') | Select-Object -First 1 [pscustomobject]@{ Vendor = $Vendor; GpuName = $g.Name; Driver = $g.Driver; DriverDate = $g.DriverDate; Discrete = $g.Discrete Software = if ($sw) { "$($sw.DisplayName) $($sw.DisplayVersion)".Trim() } else { $null }; Idsa = [bool]$idsa } } function Invoke-VendorQuickRepair([string]$Vendor) { $v = $GpuVendorInfo[$Vendor] Get-Process -Name $v.Procs -ErrorAction SilentlyContinue | Stop-Process -Force -ErrorAction SilentlyContinue Write-Log " closed the $Vendor graphics app" foreach ($s in @(Get-Service -DisplayName $v.Services -ErrorAction SilentlyContinue)) { try { if ($s.Status -eq 'Running') { Restart-Service $s.Name -Force -ErrorAction Stop; Write-Log " restarted $($s.DisplayName)" } elseif ("$($s.StartType)" -ne 'Disabled') { Start-Service $s.Name -ErrorAction Stop; Write-Log " started $($s.DisplayName)" } } catch { Write-Log " ! $($s.DisplayName): $($_.Exception.Message)" 'warn' } } $freed = 0 foreach ($p in $v.Caches) { if (Test-Path $p) { $freed += (Get-ChildItem $p -Recurse -Force -File -ErrorAction SilentlyContinue | Measure-Object Length -Sum).Sum; Remove-Item "$p\*" -Recurse -Force -ErrorAction SilentlyContinue; Write-Log " cleared $p" } } Write-Log (' freed {0:N0} MB of shader / installer caches' -f ($freed / 1MB)) 'ok' if ($v.App -and (Test-Path $v.App)) { Open-Url $v.App; Write-Log " $Vendor Software reopened" 'ok' } } # ---------------------------------------------------------------- hardware scanner function Get-SystemScan { $s = [ordered]@{} try { $cpu = Get-CimInstance Win32_Processor | Select-Object -First 1 $s.CpuName = ($cpu.Name -replace '\s+', ' ').Trim(); $s.CpuCores = $cpu.NumberOfCores; $s.CpuThreads = $cpu.NumberOfLogicalProcessors; $s.CpuMhz = $cpu.MaxClockSpeed } catch {} try { $vcs = @(Get-CimInstance Win32_VideoController) $gpu = $vcs | Where-Object { $_.Name -match 'NVIDIA|GeForce' } | Select-Object -First 1 if (-not $gpu) { $gpu = $vcs | Where-Object { $_.Name -match 'Radeon RX|Arc' } | Select-Object -First 1 } if (-not $gpu) { $gpu = $vcs | Where-Object { $_.Name -notmatch 'Basic|Remote|Virtual|Parsec|Meta' } | Select-Object -First 1 } $s.GpuName = $gpu.Name; $s.GpuDriver = $gpu.DriverVersion if ($gpu.Name -match 'NVIDIA') { $d = ($gpu.DriverVersion -replace '\.', ''); if ($d.Length -ge 5) { $x = $d.Substring($d.Length - 5); $s.GpuDriverNice = '{0}.{1}' -f $x.Substring(0, 3), $x.Substring(3) } } if (-not $s.GpuDriverNice) { $s.GpuDriverNice = $gpu.DriverVersion } if ($gpu.DriverDate) { $s.GpuDriverDate = $gpu.DriverDate.ToString('yyyy-MM-dd') } $vram = $null Get-ChildItem 'HKLM:\SYSTEM\ControlSet001\Control\Class\{4d36e968-e325-11ce-bfc1-08002be10318}' -ErrorAction SilentlyContinue | ForEach-Object { $p = Get-ItemProperty $_.PSPath -ErrorAction SilentlyContinue if ($p -and $p.DriverDesc -eq $gpu.Name -and $p.'HardwareInformation.qwMemorySize') { $vram = [int64]$p.'HardwareInformation.qwMemorySize' } } if (-not $vram -and $gpu.AdapterRAM) { $vram = [int64]$gpu.AdapterRAM } if ($vram) { $s.GpuVramGB = [math]::Round($vram / 1GB) } $s.Gpus = @(Get-GpuList) } catch {} try { $s.Monitors = @(Get-Monitors) $pm = $s.Monitors | Select-Object -First 1 if ($pm) { $s.RefreshRate = $pm.Hz; $s.Resolution = '{0} x {1}' -f $pm.Width, $pm.Height } } catch { $s.Monitors = @() $disp = Get-CimInstance Win32_VideoController | Where-Object { $_.CurrentRefreshRate -gt 1 } | Sort-Object CurrentRefreshRate -Descending | Select-Object -First 1 if ($disp) { $s.RefreshRate = [int]$disp.CurrentRefreshRate; $s.Resolution = '{0} x {1}' -f $disp.CurrentHorizontalResolution, $disp.CurrentVerticalResolution } } try { $cs = Get-CimInstance Win32_ComputerSystem $s.Maker = "$($cs.Manufacturer)".Trim(); $s.Model = "$($cs.Model)".Trim() $s.IsLaptop = [bool](@((Get-CimInstance Win32_SystemEnclosure).ChassisTypes) | Where-Object { $_ -in 8, 9, 10, 11, 12, 14, 18, 21, 30, 31, 32 }) if (-not $s.IsLaptop) { $s.IsLaptop = [bool](Get-CimInstance Win32_Battery -ErrorAction SilentlyContinue) } $s.IsDell = $s.Maker -match 'Dell|Alienware' $s.ServiceTag = "$((Get-CimInstance Win32_BIOS).SerialNumber)".Trim() } catch {} try { $mods = @(Get-CimInstance Win32_PhysicalMemory) $s.RamGB = [math]::Round((($mods | Measure-Object Capacity -Sum).Sum) / 1GB) $s.RamSticks = $mods.Count $s.RamSpeed = ($mods | Measure-Object ConfiguredClockSpeed -Maximum).Maximum $s.RamRated = ($mods | Measure-Object Speed -Maximum).Maximum $s.RamType = switch ([int]$mods[0].SMBIOSMemoryType) { 34 { 'DDR5' } 26 { 'DDR4' } 24 { 'DDR3' } default { if ($s.RamSpeed -ge 4800) { 'DDR5' } else { 'DDR4' } } } $s.RamMaker = "$($mods[0].Manufacturer)".Trim() $s.RamSlots = (Get-CimInstance Win32_PhysicalMemoryArray | Measure-Object MemoryDevices -Sum).Sum } catch {} try { $s.Disks = @(Get-PhysicalDisk -ErrorAction SilentlyContinue | Sort-Object DeviceId | ForEach-Object { [pscustomobject]@{ Name = "$($_.FriendlyName)".Trim(); Type = "$($_.MediaType)"; Bus = "$($_.BusType)"; SizeGB = [math]::Round($_.Size / 1GB) } }) try { $sys = (Get-Partition -DriveLetter $env:SystemDrive.Substring(0, 1) -ErrorAction Stop | Get-Disk).FriendlyName if ($sys) { $s.Disks = @($s.Disks | Sort-Object { $_.Name -ne "$sys".Trim() }) } } catch {} $c = Get-CimInstance Win32_LogicalDisk -Filter "DeviceID='$env:SystemDrive'" $s.CFreeGB = [math]::Round($c.FreeSpace / 1GB); $s.CSizeGB = [math]::Round($c.Size / 1GB) } catch {} try { $os = Get-CimInstance Win32_OperatingSystem $cv = Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' $s.OsName = ($os.Caption -replace 'Microsoft ', '').Trim() $s.OsVersion = '{0} (build {1}.{2})' -f $cv.DisplayVersion, $cv.CurrentBuild, $cv.UBR $up = (Get-Date) - $os.LastBootUpTime; $s.Uptime = '{0}d {1}h {2}m' -f $up.Days, $up.Hours, $up.Minutes $bb = Get-CimInstance Win32_BaseBoard; $s.Board = ("$($bb.Manufacturer) $($bb.Product)").Trim() $bios = Get-CimInstance Win32_BIOS; $s.Bios = $bios.SMBIOSBIOSVersion $s.Machine = $env:COMPUTERNAME } catch {} try { $ap = (powercfg /getactivescheme) -join ' ' if ($ap -match '([0-9a-fA-F-]{36})\s*\((.+)\)') { $s.PowerGuid = $matches[1].ToLower(); $s.PowerName = $matches[2].Trim() } $mine = if (Test-Path $PowerPlanFile) { (Get-Content $PowerPlanFile -Raw).Trim() } else { '' } $s.PowerOk = ($s.PowerGuid -in @('8c5e7fda-e8bf-4a96-9a85-cf3a7f23b2a7', 'e9a42b02-d5df-448d-aa00-03f14749eb61', $mine)) -or ($s.PowerName -match 'Ultimate|High perf|PanosOptimizationTool|ApexTune|Bitsum') } catch {} $gm = Get-Reg 'HKCU:\Software\Microsoft\GameBar' 'AutoGameModeEnabled'; $s.GameMode = ($null -eq $gm -or $gm -eq 1) $s.Hags = (Get-Reg 'HKLM:\SYSTEM\CurrentControlSet\Control\GraphicsDrivers' 'HwSchMode') -eq 2 $s.GameDvr = (Get-Reg $GCS 'GameDVR_Enabled') -ne 0 $s.MouseAccel = "$(Get-Reg 'HKCU:\Control Panel\Mouse' 'MouseSpeed')" -ne '0' $s.Transparency = (Get-Reg $PERS 'EnableTransparency') -ne 0 $s.NetThrottle = (ConvertTo-U32 (Get-Reg $MM 'NetworkThrottlingIndex')) -ne [uint32]::MaxValue $s.BgApps = (Get-Reg 'HKCU:\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications' 'GlobalUserDisabled') -ne 1 $s.Telemetry = (Get-Reg 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection' 'AllowTelemetry') -ne 0 try { $dg = Get-CimInstance -Namespace root\Microsoft\Windows\DeviceGuard -ClassName Win32_DeviceGuard -ErrorAction Stop $s.Hvci = @($dg.SecurityServicesRunning) -contains 2 } catch { $s.Hvci = $false } try { $s.StartupCount = @(Get-CimInstance Win32_StartupCommand -ErrorAction SilentlyContinue).Count } catch {} [pscustomobject]$s } } # ------------------------------------------------------------ end of $Core . $Core # ===================================================================================== # APP CATALOG (winget IDs) # ===================================================================================== function A($C, $N, $I, $S) { @{ C = $C; N = $N; I = $I; S = $S } } $Apps = @( (A 'Gaming' 'Steam' 'Valve.Steam'), (A 'Gaming' 'Epic Games Launcher' 'EpicGames.EpicGamesLauncher'), (A 'Gaming' 'EA App' 'ElectronicArts.EADesktop'), (A 'Gaming' 'Ubisoft Connect' 'Ubisoft.Connect'), (A 'Gaming' 'GOG Galaxy' 'GOG.Galaxy'), (A 'Gaming' 'Battle.net' 'Blizzard.BattleNet'), (A 'Gaming' 'Heroic Games Launcher' 'HeroicGamesLauncher.HeroicGamesLauncher'), (A 'Gaming' 'Playnite' 'Playnite.Playnite'), (A 'Gaming' 'itch.io' 'ItchIo.Itch'), (A 'Gaming' 'GeForce NOW' 'Nvidia.GeForceNow'), (A 'Gaming' 'Minecraft Launcher' 'Mojang.MinecraftLauncher'), (A 'Gaming' 'Prism Launcher' 'PrismLauncher.PrismLauncher'), (A 'Gaming' 'Modrinth App' 'Modrinth.ModrinthApp'), (A 'Gaming' 'Parsec' 'Parsec.Parsec'), (A 'Gaming' 'Moonlight' 'MoonlightGameStreamingProject.Moonlight'), (A 'Gaming' 'Sunshine' 'LizardByte.Sunshine'), (A 'Gaming' 'NVIDIA PhysX' 'Nvidia.PhysX'), (A 'Performance & Monitoring' 'MSI Afterburner' 'Guru3D.Afterburner'), (A 'Performance & Monitoring' 'RivaTuner Statistics' 'Guru3D.RTSS'), (A 'Performance & Monitoring' 'HWiNFO' 'REALiX.HWiNFO'), (A 'Performance & Monitoring' 'GPU-Z' 'TechPowerUp.GPU-Z'), (A 'Performance & Monitoring' 'CPU-Z' 'CPUID.CPU-Z'), (A 'Performance & Monitoring' 'HWMonitor' 'CPUID.HWMonitor'), (A 'Performance & Monitoring' 'Display Driver Uninstaller' 'Wagnardsoft.DisplayDriverUninstaller'), (A 'Performance & Monitoring' 'Cinebench R23' 'Maxon.CinebenchR23'), (A 'Performance & Monitoring' 'CrystalDiskInfo' 'CrystalDewWorld.CrystalDiskInfo'), (A 'Performance & Monitoring' 'CrystalDiskMark' 'CrystalDewWorld.CrystalDiskMark'), (A 'Performance & Monitoring' 'Process Lasso' 'Bitsum.ProcessLasso'), (A 'Performance & Monitoring' 'Process Explorer' 'Microsoft.Sysinternals.ProcessExplorer'), (A 'Performance & Monitoring' 'Autoruns' 'Microsoft.Sysinternals.Autoruns'), (A 'Performance & Monitoring' 'OpenRGB' 'CalcProgrammer1.OpenRGB'), (A 'Performance & Monitoring' 'Logitech G HUB' 'Logitech.GHUB'), (A 'Runtimes' 'Visual C++ 2015-2022 x64' 'Microsoft.VCRedist.2015+.x64'), (A 'Runtimes' 'Visual C++ 2015-2022 x86' 'Microsoft.VCRedist.2015+.x86'), (A 'Runtimes' 'DirectX End-User Runtime' 'Microsoft.DirectX'), (A 'Runtimes' '.NET Desktop Runtime 8' 'Microsoft.DotNet.DesktopRuntime.8'), (A 'Runtimes' '.NET Desktop Runtime 9' 'Microsoft.DotNet.DesktopRuntime.9'), (A 'Runtimes' 'XNA Framework 4.0' 'Microsoft.XNARedist'), (A 'Runtimes' 'Java 21 (Temurin)' 'EclipseAdoptium.Temurin.21.JRE'), (A 'Browsers' 'Brave' 'Brave.Brave'), (A 'Browsers' 'Chrome' 'Google.Chrome'), (A 'Browsers' 'Firefox' 'Mozilla.Firefox'), (A 'Browsers' 'Opera GX' 'Opera.OperaGX'), (A 'Browsers' 'Edge' 'Microsoft.Edge'), (A 'Browsers' 'LibreWolf' 'LibreWolf.LibreWolf'), (A 'Browsers' 'Vivaldi' 'Vivaldi.Vivaldi'), (A 'Browsers' 'Zen Browser' 'Zen-Team.Zen-Browser'), (A 'Browsers' 'Floorp' 'Ablaze.Floorp'), (A 'Browsers' 'Waterfox' 'Waterfox.Waterfox'), (A 'Browsers' 'Chromium' 'Hibbiki.Chromium'), (A 'Browsers' 'Tor Browser' 'TorProject.TorBrowser'), (A 'Communications' 'Discord' 'Discord.Discord'), (A 'Communications' 'Vesktop' 'Vencord.Vesktop'), (A 'Communications' 'TeamSpeak 3' 'TeamSpeakSystems.TeamSpeakClient'), (A 'Communications' 'Telegram' 'Telegram.TelegramDesktop'), (A 'Communications' 'Signal' 'OpenWhisperSystems.Signal'), (A 'Communications' 'WhatsApp' '9NKSQGP7F2NH' 'msstore'), (A 'Communications' 'Viber' 'Rakuten.Viber'), (A 'Communications' 'Slack' 'SlackTechnologies.Slack'), (A 'Communications' 'Microsoft Teams' 'Microsoft.Teams'), (A 'Communications' 'Zoom' 'Zoom.Zoom'), (A 'Communications' 'Thunderbird' 'Mozilla.Thunderbird'), (A 'Communications' 'Element' 'Element.Element'), (A 'Multimedia' 'OBS Studio' 'OBSProject.OBSStudio'), (A 'Multimedia' 'VLC' 'VideoLAN.VLC'), (A 'Multimedia' 'Spotify' 'Spotify.Spotify'), (A 'Multimedia' 'ShareX' 'ShareX.ShareX'), (A 'Multimedia' 'Audacity' 'Audacity.Audacity'), (A 'Multimedia' 'HandBrake' 'HandBrake.HandBrake'), (A 'Multimedia' 'Kdenlive' 'KDE.Kdenlive'), (A 'Multimedia' 'Shotcut' 'Meltytech.Shotcut'), (A 'Multimedia' 'GIMP' 'GIMP.GIMP.3'), (A 'Multimedia' 'Krita' 'KDE.Krita'), (A 'Multimedia' 'Paint.NET' 'dotPDN.PaintDotNet'), (A 'Multimedia' 'Blender' 'BlenderFoundation.Blender'), (A 'Multimedia' 'EarTrumpet' 'File-New-Project.EarTrumpet'), (A 'Multimedia' 'foobar2000' 'PeterPawlowski.foobar2000'), (A 'Multimedia' 'AIMP' 'AIMP.AIMP'), (A 'Multimedia' 'MPC-HC' 'clsid2.mpc-hc'), (A 'Multimedia' 'K-Lite Codec Pack' 'CodecGuide.K-LiteCodecPack.Standard'), (A 'Multimedia' 'IrfanView' 'IrfanSkiljan.IrfanView'), (A 'Multimedia' 'Calibre' 'calibre.calibre'), (A 'Development' 'VS Code' 'Microsoft.VisualStudioCode'), (A 'Development' 'VSCodium' 'VSCodium.VSCodium'), (A 'Development' 'Cursor' 'Anysphere.Cursor'), (A 'Development' 'Claude Desktop' 'Anthropic.Claude'), (A 'Development' 'Git' 'Git.Git'), (A 'Development' 'GitHub Desktop' 'GitHub.GitHubDesktop'), (A 'Development' 'GitHub CLI' 'GitHub.cli'), (A 'Development' 'Windows Terminal' 'Microsoft.WindowsTerminal'), (A 'Development' 'PowerShell 7' 'Microsoft.PowerShell'), (A 'Development' 'NodeJS LTS' 'OpenJS.NodeJS.LTS'), (A 'Development' 'Python 3.13' 'Python.Python.3.13'), (A 'Development' 'Docker Desktop' 'Docker.DockerDesktop'), (A 'Development' 'Notepad++' 'Notepad++.Notepad++'), (A 'Development' 'Sublime Text' 'SublimeHQ.SublimeText.4'), (A 'Development' 'Neovim' 'Neovim.Neovim'), (A 'Development' 'Zed' 'ZedIndustries.Zed'), (A 'Development' 'Postman' 'Postman.Postman'), (A 'Development' 'Rustup' 'Rustlang.Rustup'), (A 'Development' 'Go' 'GoLang.Go'), (A 'Development' 'pnpm' 'pnpm.pnpm'), (A 'Development' 'uv' 'astral-sh.uv'), (A 'Development' 'JetBrains Toolbox' 'JetBrains.Toolbox'), (A 'Development' 'Visual Studio 2022' 'Microsoft.VisualStudio.2022.Community'), (A 'Development' 'Unity Hub' 'Unity.UnityHub'), (A 'Documents' 'LibreOffice' 'TheDocumentFoundation.LibreOffice'), (A 'Documents' 'ONLYOFFICE' 'ONLYOFFICE.DesktopEditors'), (A 'Documents' 'Adobe Acrobat Reader' 'Adobe.Acrobat.Reader.64-bit'), (A 'Documents' 'SumatraPDF' 'SumatraPDF.SumatraPDF'), (A 'Documents' 'Foxit PDF Reader' 'Foxit.FoxitReader'), (A 'Documents' 'Obsidian' 'Obsidian.Obsidian'), (A 'Documents' 'Notion' 'Notion.Notion'), (A 'Documents' 'Joplin' 'Joplin.Joplin'), (A 'Documents' 'Zotero' 'DigitalScholar.Zotero'), (A 'Utilities' '7-Zip' '7zip.7zip'), (A 'Utilities' 'NanaZip' 'M2Team.NanaZip'), (A 'Utilities' 'WinRAR' 'RARLab.WinRAR'), (A 'Utilities' 'Everything' 'voidtools.Everything'), (A 'Utilities' 'PowerToys' 'Microsoft.PowerToys'), (A 'Utilities' 'Flow Launcher' 'Flow-Launcher.Flow-Launcher'), (A 'Utilities' 'Bitwarden' 'Bitwarden.Bitwarden'), (A 'Utilities' 'KeePassXC' 'KeePassXCTeam.KeePassXC'), (A 'Utilities' 'Bulk Crap Uninstaller' 'Klocman.BulkCrapUninstaller'), (A 'Utilities' 'Revo Uninstaller' 'RevoUninstaller.RevoUninstaller'), (A 'Utilities' 'BleachBit' 'BleachBit.BleachBit'), (A 'Utilities' 'WizTree' 'AntibodySoftware.WizTree'), (A 'Utilities' 'WinDirStat' 'WinDirStat.WinDirStat'), (A 'Utilities' 'qBittorrent' 'qBittorrent.qBittorrent'), (A 'Utilities' 'Rufus' 'Rufus.Rufus'), (A 'Utilities' 'Ventoy' 'Ventoy.Ventoy'), (A 'Utilities' 'AnyDesk' 'AnyDesk.AnyDesk'), (A 'Utilities' 'TeamViewer' 'TeamViewer.TeamViewer'), (A 'Utilities' 'Google Drive' 'Google.GoogleDrive'), (A 'Utilities' 'Dropbox' 'Dropbox.Dropbox'), (A 'Utilities' 'LocalSend' 'LocalSend.LocalSend'), (A 'Utilities' 'AutoHotkey' 'AutoHotkey.AutoHotkey'), (A 'Utilities' 'StartAllBack' 'StartIsBack.StartAllBack'), (A 'Utilities' 'TranslucentTB' 'CharlesMilette.TranslucentTB'), (A 'Utilities' 'Ditto Clipboard' 'Ditto.Ditto'), (A 'Utilities' 'Files' 'FilesCommunity.Files'), (A 'Utilities' 'UniGetUI' 'MartiCliment.UniGetUI'), (A 'Utilities' 'O&O ShutUp10++' 'OO-Software.ShutUp10'), (A 'Network & Security' 'Cloudflare WARP' 'Cloudflare.Warp'), (A 'Network & Security' 'Proton VPN' 'Proton.ProtonVPN'), (A 'Network & Security' 'WireGuard' 'WireGuard.WireGuard'), (A 'Network & Security' 'Tailscale' 'Tailscale.Tailscale'), (A 'Network & Security' 'Wireshark' 'WiresharkFoundation.Wireshark'), (A 'Network & Security' 'Nmap' 'Insecure.Nmap'), (A 'Network & Security' 'PuTTY' 'PuTTY.PuTTY'), (A 'Network & Security' 'WinSCP' 'WinSCP.WinSCP'), (A 'Network & Security' 'Advanced IP Scanner' 'Famatech.AdvancedIPScanner'), (A 'Network & Security' 'Angry IP Scanner' 'angryziber.AngryIPScanner'), (A 'Network & Security' 'OpenVPN Connect' 'OpenVPNTechnologies.OpenVPNConnect'), (A 'Network & Security' 'Malwarebytes' 'Malwarebytes.Malwarebytes') ) # website of each app - its favicon becomes the tile icon (letter badge if offline / not found) $AppIcons = @{ 'Valve.Steam' = 'steampowered.com'; 'EpicGames.EpicGamesLauncher' = 'epicgames.com'; 'ElectronicArts.EADesktop' = 'ea.com'; 'Ubisoft.Connect' = 'ubisoft.com' 'GOG.Galaxy' = 'gog.com'; 'Blizzard.BattleNet' = 'battle.net'; 'HeroicGamesLauncher.HeroicGamesLauncher' = 'heroicgameslauncher.com'; 'Playnite.Playnite' = 'playnite.link' 'ItchIo.Itch' = 'itch.io'; 'Nvidia.GeForceNow' = 'nvidia.com'; 'Mojang.MinecraftLauncher' = 'minecraft.net'; 'PrismLauncher.PrismLauncher' = 'prismlauncher.org' 'Modrinth.ModrinthApp' = 'modrinth.com'; 'Parsec.Parsec' = 'parsec.app'; 'MoonlightGameStreamingProject.Moonlight' = 'moonlight-stream.org'; 'LizardByte.Sunshine' = 'app.lizardbyte.dev' 'Nvidia.PhysX' = 'nvidia.com' 'Guru3D.Afterburner' = 'msi.com'; 'Guru3D.RTSS' = 'guru3d.com'; 'REALiX.HWiNFO' = 'hwinfo.com'; 'TechPowerUp.GPU-Z' = 'techpowerup.com'; 'CPUID.CPU-Z' = 'cpuid.com' 'CPUID.HWMonitor' = 'cpuid.com'; 'Wagnardsoft.DisplayDriverUninstaller' = 'wagnardsoft.com'; 'Maxon.CinebenchR23' = 'maxon.net'; 'CrystalDewWorld.CrystalDiskInfo' = 'crystalmark.info' 'CrystalDewWorld.CrystalDiskMark' = 'crystalmark.info'; 'Bitsum.ProcessLasso' = 'bitsum.com'; 'Microsoft.Sysinternals.ProcessExplorer' = 'sysinternals.com'; 'Microsoft.Sysinternals.Autoruns' = 'sysinternals.com' 'CalcProgrammer1.OpenRGB' = 'openrgb.org'; 'Logitech.GHUB' = 'logitechg.com' 'Microsoft.VCRedist.2015+.x64' = 'visualstudio.microsoft.com'; 'Microsoft.VCRedist.2015+.x86' = 'visualstudio.microsoft.com'; 'Microsoft.DirectX' = 'microsoft.com' 'Microsoft.DotNet.DesktopRuntime.8' = 'dotnet.microsoft.com'; 'Microsoft.DotNet.DesktopRuntime.9' = 'dotnet.microsoft.com'; 'Microsoft.XNARedist' = 'microsoft.com'; 'EclipseAdoptium.Temurin.21.JRE' = 'adoptium.net' 'Brave.Brave' = 'brave.com'; 'Google.Chrome' = 'chrome.com'; 'Mozilla.Firefox' = 'firefox.com'; 'Opera.OperaGX' = 'gx.me'; 'Microsoft.Edge' = 'microsoftedgeinsider.com' 'LibreWolf.LibreWolf' = 'librewolf.net'; 'Vivaldi.Vivaldi' = 'vivaldi.com'; 'Zen-Team.Zen-Browser' = 'zen-browser.app'; 'Ablaze.Floorp' = 'floorp.app'; 'Waterfox.Waterfox' = 'waterfox.net' 'Hibbiki.Chromium' = 'chromium.org'; 'TorProject.TorBrowser' = 'torproject.org' 'Discord.Discord' = 'discord.com'; 'Vencord.Vesktop' = 'vencord.dev'; 'TeamSpeakSystems.TeamSpeakClient' = 'teamspeak.com'; 'Telegram.TelegramDesktop' = 'telegram.org' 'OpenWhisperSystems.Signal' = 'signal.org'; '9NKSQGP7F2NH' = 'whatsapp.com'; 'Rakuten.Viber' = 'viber.com'; 'SlackTechnologies.Slack' = 'slack.com'; 'Microsoft.Teams' = 'teams.microsoft.com' 'Zoom.Zoom' = 'zoom.us'; 'Mozilla.Thunderbird' = 'thunderbird.net'; 'Element.Element' = 'element.io' 'OBSProject.OBSStudio' = 'obsproject.com'; 'VideoLAN.VLC' = 'videolan.org/vlc'; 'Spotify.Spotify' = 'spotify.com'; 'ShareX.ShareX' = 'getsharex.com'; 'Audacity.Audacity' = 'audacityteam.org' 'HandBrake.HandBrake' = 'handbrake.fr'; 'KDE.Kdenlive' = 'kdenlive.org'; 'Meltytech.Shotcut' = 'shotcut.org'; 'GIMP.GIMP.3' = 'gimp.org'; 'KDE.Krita' = 'krita.org' 'dotPDN.PaintDotNet' = 'getpaint.net'; 'BlenderFoundation.Blender' = 'blender.org'; 'File-New-Project.EarTrumpet' = 'eartrumpet.app'; 'PeterPawlowski.foobar2000' = 'foobar2000.org' 'AIMP.AIMP' = 'aimp.ru'; 'clsid2.mpc-hc' = 'mpc-hc.org'; 'CodecGuide.K-LiteCodecPack.Standard' = 'codecguide.com'; 'IrfanSkiljan.IrfanView' = 'irfanview.com'; 'calibre.calibre' = 'calibre-ebook.com' 'Microsoft.VisualStudioCode' = 'code.visualstudio.com'; 'VSCodium.VSCodium' = 'vscodium.com'; 'Anysphere.Cursor' = 'cursor.com'; 'Anthropic.Claude' = 'claude.ai'; 'Git.Git' = 'git-scm.com' 'GitHub.GitHubDesktop' = 'desktop.github.com'; 'GitHub.cli' = 'cli.github.com'; 'Microsoft.WindowsTerminal' = 'microsoft.com'; 'Microsoft.PowerShell' = 'powershellgallery.com' 'OpenJS.NodeJS.LTS' = 'nodejs.org'; 'Python.Python.3.13' = 'python.org'; 'Docker.DockerDesktop' = 'docker.com'; 'Notepad++.Notepad++' = 'notepad-plus-plus.org' 'SublimeHQ.SublimeText.4' = 'sublimetext.com'; 'Neovim.Neovim' = 'neovim.io'; 'ZedIndustries.Zed' = 'zed.dev'; 'Postman.Postman' = 'postman.com'; 'Rustlang.Rustup' = 'rust-lang.org' 'GoLang.Go' = 'go.dev'; 'pnpm.pnpm' = 'pnpm.io'; 'astral-sh.uv' = 'astral.sh'; 'JetBrains.Toolbox' = 'jetbrains.com'; 'Microsoft.VisualStudio.2022.Community' = 'visualstudio.microsoft.com' 'Unity.UnityHub' = 'unity.com' 'TheDocumentFoundation.LibreOffice' = 'libreoffice.org'; 'ONLYOFFICE.DesktopEditors' = 'onlyoffice.com'; 'Adobe.Acrobat.Reader.64-bit' = 'adobe.com'; 'SumatraPDF.SumatraPDF' = 'sumatrapdfreader.org' 'Foxit.FoxitReader' = 'foxit.com'; 'Obsidian.Obsidian' = 'obsidian.md'; 'Notion.Notion' = 'notion.so'; 'Joplin.Joplin' = 'joplinapp.org'; 'DigitalScholar.Zotero' = 'zotero.org' '7zip.7zip' = '7-zip.org'; 'M2Team.NanaZip' = 'github.com'; 'RARLab.WinRAR' = 'win-rar.com'; 'voidtools.Everything' = 'voidtools.com'; 'Microsoft.PowerToys' = 'microsoft.com' 'Flow-Launcher.Flow-Launcher' = 'flowlauncher.com'; 'Bitwarden.Bitwarden' = 'bitwarden.com'; 'KeePassXCTeam.KeePassXC' = 'keepassxc.org'; 'Klocman.BulkCrapUninstaller' = 'bcuninstaller.com' 'RevoUninstaller.RevoUninstaller' = 'revouninstaller.com'; 'BleachBit.BleachBit' = 'bleachbit.org'; 'AntibodySoftware.WizTree' = 'diskanalyzer.com'; 'WinDirStat.WinDirStat' = 'windirstat.net' 'qBittorrent.qBittorrent' = 'qbittorrent.org'; 'Rufus.Rufus' = 'rufus.ie'; 'Ventoy.Ventoy' = 'ventoy.net'; 'AnyDesk.AnyDesk' = 'anydesk.com'; 'TeamViewer.TeamViewer' = 'teamviewer.com' 'Google.GoogleDrive' = 'drive.google.com'; 'Dropbox.Dropbox' = 'dropbox.com'; 'LocalSend.LocalSend' = 'localsend.org'; 'AutoHotkey.AutoHotkey' = 'autohotkey.com' 'StartIsBack.StartAllBack' = 'startallback.com'; 'CharlesMilette.TranslucentTB' = 'github.com'; 'Ditto.Ditto' = 'ditto-cp.sourceforge.io'; 'FilesCommunity.Files' = 'files.community' 'MartiCliment.UniGetUI' = 'devolutions.net'; 'OO-Software.ShutUp10' = 'oo-software.com' 'Cloudflare.Warp' = 'one.one.one.one'; 'Proton.ProtonVPN' = 'protonvpn.com'; 'WireGuard.WireGuard' = 'wireguard.com'; 'Tailscale.Tailscale' = 'tailscale.com' 'WiresharkFoundation.Wireshark' = 'wireshark.org'; 'Insecure.Nmap' = 'nmap.org'; 'PuTTY.PuTTY' = 'putty.org'; 'WinSCP.WinSCP' = 'winscp.net' 'Famatech.AdvancedIPScanner' = 'advanced-ip-scanner.com'; 'angryziber.AngryIPScanner' = 'angryip.org'; 'OpenVPNTechnologies.OpenVPNConnect' = 'openvpn.net'; 'Malwarebytes.Malwarebytes' = 'malwarebytes.com' } $GamerPack = 'Valve.Steam', 'Discord.Discord', 'Guru3D.Afterburner', 'Guru3D.RTSS', 'REALiX.HWiNFO', 'Microsoft.VCRedist.2015+.x64', 'Microsoft.VCRedist.2015+.x86', 'Microsoft.DirectX', 'Microsoft.DotNet.DesktopRuntime.8', '7zip.7zip', 'OBSProject.OBSStudio' # ===================================================================================== # XAML # ===================================================================================== $Xaml = @' Segoe Fluent Icons, Segoe MDL2 Assets