#requires -version 5.1 <# Midaxas Personal Toolbox Hosted entrypoint: irm midaxas.top/win | iex This script is designed as a clean personal Windows customization menu. Each major feature lives in its own function so new actions can be added without rewriting the menu. #> [CmdletBinding()] param() Set-StrictMode -Version Latest $ErrorActionPreference = 'Stop' # region Global Settings $script:ToolboxName = 'Midaxas Personal Toolbox' $script:AccentColor = 'Cyan' $script:SuccessColor = 'Green' $script:WarningColor = 'Yellow' $script:DangerColor = 'Red' $script:MutedColor = 'DarkGray' # Default apps installed by winget. Edit this list to match your setup. $script:DefaultApps = @( 'Brave.Brave', 'Discord.Discord', 'VideoLAN.VLC', 'Audacity.Audacity', 'Spotify.Spotify', '7zip.7zip', 'RARLab.WinRAR', 'Microsoft.DotNet.DesktopRuntime.9', 'EclipseAdoptium.Temurin.25.JDK', 'Valve.Steam', 'voidtools.Everything', 'Microsoft.VCRedist.2015+.x64', 'qBittorrent.qBittorrent', 'Python.Python.3.13', 'Git.Git', 'Notepad++.Notepad++', 'Microsoft.VisualStudioCode' ) # Common inbox apps many users remove. Review before running on a fresh PC. $script:BloatwarePackages = @( 'Microsoft.BingNews', 'Microsoft.BingWeather', 'Microsoft.GetHelp', 'Microsoft.Getstarted', 'Microsoft.Microsoft3DViewer', 'Microsoft.MicrosoftOfficeHub', 'Microsoft.MicrosoftSolitaireCollection', 'Microsoft.MixedReality.Portal', 'Microsoft.People', 'Microsoft.SkypeApp', 'Microsoft.Todos', 'Microsoft.WindowsFeedbackHub', 'Microsoft.WindowsMaps', 'Microsoft.Xbox.TCUI', 'Microsoft.XboxApp', 'Microsoft.XboxGameOverlay', 'Microsoft.XboxGamingOverlay', 'Microsoft.XboxIdentityProvider', 'Microsoft.XboxSpeechToTextOverlay', 'Microsoft.YourPhone', 'Microsoft.ZuneMusic', 'Microsoft.ZuneVideo' ) # endregion Global Settings # region Helper Functions function Test-IsAdministrator { $identity = [Security.Principal.WindowsIdentity]::GetCurrent() $principal = [Security.Principal.WindowsPrincipal]::new($identity) return $principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator) } function Request-Elevation { if (Test-IsAdministrator) { return } Write-Host '' Write-Host 'Administrator privileges are required for system customization.' -ForegroundColor $script:WarningColor Write-Host 'A new elevated PowerShell window will open now.' -ForegroundColor $script:MutedColor Start-Sleep -Seconds 2 $encodedCommand = [Convert]::ToBase64String( [Text.Encoding]::Unicode.GetBytes("irm midaxas.top/win | iex") ) Start-Process -FilePath 'powershell.exe' -Verb RunAs -ArgumentList @( '-NoProfile', '-ExecutionPolicy', 'Bypass', '-EncodedCommand', $encodedCommand ) exit } function Write-Section { param( [Parameter(Mandatory)] [string] $Title ) Write-Host '' Write-Host ('=' * 72) -ForegroundColor $script:MutedColor Write-Host " $Title" -ForegroundColor $script:AccentColor Write-Host ('=' * 72) -ForegroundColor $script:MutedColor } function Write-Step { param( [Parameter(Mandatory)] [string] $Message ) Write-Host "[*] $Message" -ForegroundColor $script:AccentColor } function Write-Success { param( [Parameter(Mandatory)] [string] $Message ) Write-Host "[OK] $Message" -ForegroundColor $script:SuccessColor } function Write-WarningMessage { param( [Parameter(Mandatory)] [string] $Message ) Write-Host "[!] $Message" -ForegroundColor $script:WarningColor } function Confirm-Action { param( [Parameter(Mandatory)] [string] $Prompt ) $answer = Read-Host "$Prompt [Y/N]" return $answer -match '^(y|yes)$' } function Wait-ForUser { Write-Host '' Write-Host 'Press Enter to return to the menu...' -ForegroundColor $script:MutedColor -NoNewline [void] [Console]::ReadLine() } function Invoke-Safely { param( [Parameter(Mandatory)] [scriptblock] $Action, [Parameter(Mandatory)] [string] $SuccessMessage, [Parameter(Mandatory)] [string] $FailureMessage ) try { & $Action Write-Success $SuccessMessage } catch { Write-WarningMessage "$FailureMessage $($_.Exception.Message)" } } function Set-RegistryValue { param( [Parameter(Mandatory)] [string] $Path, [Parameter(Mandatory)] [string] $Name, [Parameter(Mandatory)] [object] $Value, [Parameter()] [Microsoft.Win32.RegistryValueKind] $Type = [Microsoft.Win32.RegistryValueKind]::DWord ) if (-not (Test-Path -Path $Path)) { New-Item -Path $Path -Force | Out-Null } New-ItemProperty -Path $Path -Name $Name -Value $Value -PropertyType $Type -Force | Out-Null } # endregion Helper Functions # region UI function Show-Banner { Clear-Host Write-Host '' Write-Host ' __ __ _ _ ' -ForegroundColor Cyan Write-Host ' | \/ (_) __| | __ ___ ____ _ ___ ' -ForegroundColor Cyan Write-Host ' | |\/| | |/ _` |/ _` \ \/ / _` / __| ' -ForegroundColor Blue Write-Host ' | | | | | (_| | (_| |> < (_| \__ \ ' -ForegroundColor Blue Write-Host ' |_| |_|_|\__,_|\__,_/_/\_\__,_|___/ ' -ForegroundColor Magenta Write-Host '' Write-Host " $($script:ToolboxName)" -ForegroundColor White Write-Host ' Windows customization, cleaner and faster.' -ForegroundColor DarkGray Write-Host '' } function Show-Menu { Write-Host '' Write-Host ' [1] ' -ForegroundColor $script:AccentColor -NoNewline Write-Host 'Debloat Windows' Write-Host ' [2] ' -ForegroundColor $script:AccentColor -NoNewline Write-Host 'Install Default Apps' Write-Host ' [3] ' -ForegroundColor $script:AccentColor -NoNewline Write-Host 'Performance & Gaming Optimizations' Write-Host ' [4] ' -ForegroundColor $script:AccentColor -NoNewline Write-Host 'Privacy & Security Tweaks' Write-Host ' [5] ' -ForegroundColor $script:AccentColor -NoNewline Write-Host 'System Information' Write-Host ' [6] ' -ForegroundColor $script:AccentColor -NoNewline Write-Host 'Update All Apps' Write-Host ' [0] ' -ForegroundColor $script:AccentColor -NoNewline Write-Host 'Exit' Write-Host '' } function Write-Footer { Write-Host '' Write-Host ('-' * 72) -ForegroundColor $script:MutedColor Write-Host 'Made by Midaxas' -ForegroundColor Magenta } # endregion UI # region Toolbox Actions function Invoke-DebloatWindows { Write-Section 'Debloat Windows' Write-WarningMessage 'This removes selected Microsoft Store apps and disables common consumer features.' if (-not (Confirm-Action 'Continue with Windows debloat actions?')) { Write-WarningMessage 'Debloat cancelled.' return } foreach ($packageName in $script:BloatwarePackages) { Write-Step "Removing package: $packageName" Invoke-Safely -Action { Get-AppxPackage -Name $packageName -AllUsers | Remove-AppxPackage -AllUsers -ErrorAction SilentlyContinue Get-AppxProvisionedPackage -Online | Where-Object DisplayName -eq $packageName | Remove-AppxProvisionedPackage -Online -ErrorAction SilentlyContinue | Out-Null } -SuccessMessage "Processed $packageName" -FailureMessage "Could not process $packageName." } Write-Step 'Disabling consumer content suggestions.' Invoke-Safely -Action { Set-RegistryValue -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent' -Name 'DisableWindowsConsumerFeatures' -Value 1 Set-RegistryValue -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' -Name 'SubscribedContent-338388Enabled' -Value 0 Set-RegistryValue -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' -Name 'SubscribedContent-338389Enabled' -Value 0 Set-RegistryValue -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager' -Name 'SilentInstalledAppsEnabled' -Value 0 } -SuccessMessage 'Consumer suggestions disabled.' -FailureMessage 'Could not disable consumer suggestions.' Write-Step 'Disabling selected telemetry scheduled tasks.' $tasks = @( '\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser', '\Microsoft\Windows\Application Experience\ProgramDataUpdater', '\Microsoft\Windows\Customer Experience Improvement Program\Consolidator', '\Microsoft\Windows\Customer Experience Improvement Program\UsbCeip' ) foreach ($task in $tasks) { Invoke-Safely -Action { Disable-ScheduledTask -TaskPath ([IO.Path]::GetDirectoryName($task).Replace('\Microsoft\Windows\', '\Microsoft\Windows\') + '\') -TaskName ([IO.Path]::GetFileName($task)) | Out-Null } -SuccessMessage "Disabled task: $task" -FailureMessage "Could not disable task: $task." } Write-Success 'Debloat routine complete. A restart is recommended.' } function Install-DefaultApps { Write-Section 'Install Default Apps' if (-not (Get-Command winget -ErrorAction SilentlyContinue)) { Write-WarningMessage 'winget was not found. Install App Installer from Microsoft Store, then try again.' return } Write-Host 'Apps to install:' -ForegroundColor White $script:DefaultApps | ForEach-Object { Write-Host " - $_" -ForegroundColor $script:MutedColor } if (-not (Confirm-Action 'Install these apps using winget?')) { Write-WarningMessage 'App installation cancelled.' return } foreach ($app in $script:DefaultApps) { Write-Step "Installing $app" Invoke-Safely -Action { winget install --id $app --exact --silent --accept-package-agreements --accept-source-agreements } -SuccessMessage "Installed or already present: $app" -FailureMessage "Install failed for $app." } Write-Success 'Default app routine complete.' } function Invoke-PerformanceGamingOptimizations { Write-Section 'Performance & Gaming Optimizations' Write-WarningMessage 'These tweaks adjust power, Game DVR, visual effects, and responsiveness settings.' if (-not (Confirm-Action 'Apply performance and gaming optimizations?')) { Write-WarningMessage 'Performance routine cancelled.' return } Write-Step 'Setting active power plan to High Performance when available.' Invoke-Safely -Action { powercfg -setactive SCHEME_MIN } -SuccessMessage 'High Performance power plan selected.' -FailureMessage 'Could not set High Performance power plan.' Write-Step 'Disabling Xbox Game DVR captures.' Invoke-Safely -Action { Set-RegistryValue -Path 'HKCU:\System\GameConfigStore' -Name 'GameDVR_Enabled' -Value 0 Set-RegistryValue -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\GameDVR' -Name 'AppCaptureEnabled' -Value 0 } -SuccessMessage 'Game DVR disabled.' -FailureMessage 'Could not disable Game DVR.' Write-Step 'Prioritizing foreground apps and responsive UI behavior.' Invoke-Safely -Action { Set-RegistryValue -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile' -Name 'SystemResponsiveness' -Value 10 Set-RegistryValue -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile' -Name 'NetworkThrottlingIndex' -Value 0xffffffff } -SuccessMessage 'Responsiveness settings applied.' -FailureMessage 'Could not apply responsiveness settings.' Write-Step 'Reducing menu animation delay.' Invoke-Safely -Action { Set-RegistryValue -Path 'HKCU:\Control Panel\Desktop' -Name 'MenuShowDelay' -Value '100' -Type String } -SuccessMessage 'Menu delay reduced.' -FailureMessage 'Could not adjust menu delay.' Write-Success 'Performance routine complete. Sign out or restart to apply all changes.' } function Invoke-PrivacySecurityTweaks { Write-Section 'Privacy & Security Tweaks' Write-WarningMessage 'These tweaks reduce tracking features while keeping Windows security features enabled.' if (-not (Confirm-Action 'Apply privacy and security tweaks?')) { Write-WarningMessage 'Privacy routine cancelled.' return } Write-Step 'Reducing Windows advertising ID and app launch tracking.' Invoke-Safely -Action { Set-RegistryValue -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo' -Name 'Enabled' -Value 0 Set-RegistryValue -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'Start_TrackProgs' -Value 0 } -SuccessMessage 'Advertising and launch tracking reduced.' -FailureMessage 'Could not change advertising or tracking settings.' Write-Step 'Setting diagnostic data policy to required level where supported.' Invoke-Safely -Action { Set-RegistryValue -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection' -Name 'AllowTelemetry' -Value 1 } -SuccessMessage 'Diagnostic data policy applied.' -FailureMessage 'Could not apply diagnostic data policy.' Write-Step 'Disabling location access policy.' Invoke-Safely -Action { Set-RegistryValue -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors' -Name 'DisableLocation' -Value 1 } -SuccessMessage 'Location policy applied.' -FailureMessage 'Could not apply location policy.' Write-Step 'Enabling Windows Defender SmartScreen where available.' Invoke-Safely -Action { Set-RegistryValue -Path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\System' -Name 'EnableSmartScreen' -Value 1 } -SuccessMessage 'SmartScreen policy enabled.' -FailureMessage 'Could not enable SmartScreen policy.' Write-Success 'Privacy and security routine complete. A restart is recommended.' } function Show-SystemInformation { Write-Section 'System Information' $computerSystem = Get-CimInstance -ClassName Win32_ComputerSystem $operatingSystem = Get-CimInstance -ClassName Win32_OperatingSystem $processor = Get-CimInstance -ClassName Win32_Processor | Select-Object -First 1 $bios = Get-CimInstance -ClassName Win32_BIOS $gpu = Get-CimInstance -ClassName Win32_VideoController | Select-Object -First 1 $osDrive = Get-CimInstance -ClassName Win32_LogicalDisk -Filter "DeviceID='$($env:SystemDrive)'" $totalRamGb = [Math]::Round($computerSystem.TotalPhysicalMemory / 1GB, 2) $freeRamGb = [Math]::Round($operatingSystem.FreePhysicalMemory / 1MB, 2) $diskSizeGb = if ($osDrive) { [Math]::Round($osDrive.Size / 1GB, 2) } else { 'Unknown' } $diskFreeGb = if ($osDrive) { [Math]::Round($osDrive.FreeSpace / 1GB, 2) } else { 'Unknown' } $gpuName = if ($gpu) { $gpu.Name } else { 'Unknown' } Write-Host "Computer Name : $env:COMPUTERNAME" -ForegroundColor White Write-Host "User : $env:USERNAME" -ForegroundColor White Write-Host "Manufacturer : $($computerSystem.Manufacturer)" -ForegroundColor White Write-Host "Model : $($computerSystem.Model)" -ForegroundColor White Write-Host "Windows : $($operatingSystem.Caption) $($operatingSystem.Version)" -ForegroundColor White Write-Host "CPU : $($processor.Name)" -ForegroundColor White Write-Host "GPU : $gpuName" -ForegroundColor White Write-Host "BIOS : $($bios.SMBIOSBIOSVersion)" -ForegroundColor White Write-Host "RAM : $totalRamGb GB total, $freeRamGb GB free" -ForegroundColor White Write-Host "System Drive : $diskFreeGb GB free of $diskSizeGb GB" -ForegroundColor White Write-Host "PowerShell : $($PSVersionTable.PSVersion)" -ForegroundColor White } function Update-AllApps { Write-Section 'Update All Apps' if (-not (Get-Command winget -ErrorAction SilentlyContinue)) { Write-WarningMessage 'winget was not found. Install App Installer from Microsoft Store, then try again.' return } if (-not (Confirm-Action 'Update all available winget packages?')) { Write-WarningMessage 'App update cancelled.' return } Write-Step 'Refreshing winget sources.' Invoke-Safely -Action { winget source update } -SuccessMessage 'winget sources refreshed.' -FailureMessage 'Could not refresh winget sources.' Write-Step 'Upgrading all packages.' Invoke-Safely -Action { winget upgrade --all --silent --accept-package-agreements --accept-source-agreements } -SuccessMessage 'App updates complete.' -FailureMessage 'One or more app updates failed.' } # endregion Toolbox Actions # region Main function Start-MidaxasToolbox { Request-Elevation do { Show-Banner Show-Menu $choice = Read-Host 'Select an option' switch ($choice) { '1' { Invoke-DebloatWindows Wait-ForUser } '2' { Install-DefaultApps Wait-ForUser } '3' { Invoke-PerformanceGamingOptimizations Wait-ForUser } '4' { Invoke-PrivacySecurityTweaks Wait-ForUser } '5' { Show-SystemInformation Wait-ForUser } '6' { Update-AllApps Wait-ForUser } '0' { Write-Footer Write-Host 'Goodbye.' -ForegroundColor $script:AccentColor } default { Write-WarningMessage 'Invalid selection. Please choose a menu number.' Start-Sleep -Seconds 1 } } } while ($choice -ne '0') } Start-MidaxasToolbox # endregion Main