#check if executed with admin rights. if not then ask users permission for UAC. If (!([Security.Principal.WindowsIdentity]::GetCurrent().Groups | Select-String "S-1-5-32-544")) { Clear-Host Write-Host 'Run as Administrator. Admin rights are required to work properly.' -ForegroundColor cyan Write-Host 'Exiting...' start-sleep 10 exit } (Get-Host).UI.RawUI.BackgroundColor = 'black' (Get-Host).UI.RawUI.ForegroundColor = 'white' Clear-Host Write-Host ' >>> Initializing User Interface.' -ForegroundColor cyan $ErrorActionPreference = 'SilentlyContinue' $ProgressPreference = 'SilentlyContinue' Set-PSDebug -Off Add-Type -AssemblyName System.Windows.Forms Add-Type -AssemblyName PresentationCore,PresentationFramework # Loading User interface from link to reduce the initial request size iex((New-Object System.Net.WebClient).DownloadString('https://tool.windowpowertool.workers.dev/user-interface')) $panelAbout.Controls.AddRange(@($picturebox2,$Laboutdes,$LAbout,$btnOfficialSite)) $panelsysset.Controls.AddRange(@($btnResetWindowsUpdate,$btnDisNewNinterest,$btnDiskCleanup,$btnDisWebsearch,$btnEnNewNinterest,$btnEnWebsearch,$btnDisNetPer,$btnDisActivityHistory,$btnEnNetPer,$btnEnActivityHistory,$btnDisBackgroundApps,$btnDisActionCenter,$btnEnBackgroundApps,$btnEnActionCenter,$btnUndoTimerResolutio,$btnBalancedMode,$btnSetTimerResolution,$btnUltraPowerMode,$btnDefaultAnimation,$btnDisCortana,$btnQuickAnimation,$btnLightMode,$btnEnCortana,$btnDarkMode,$btnDisPowerThrottli,$btnEnPowerThrottlin,$LNewNinterest,$LNetPerformance,$LUserActivityHistory,$LPowerThrottlingLimit,$LResetUpdate,$LTimerResolution,$LPowerMode,$LBackgroundApps,$LStartmenuWebsearch,$LActionCenter,$LSystemSettings)) $panelrestore.Controls.AddRange(@($btnRestore,$btnCreateRestorePoint,$LRestoreDescript,$LRestore,$LBackupRestoreDescript,$LBackupRestore)) $panelRemovalSection.Controls.AddRange(@($Ldebloat,$btnMsStoreReinstall,$btnMsStoreRemove,$LCompletelyRemoveMicr,$btnOneDriveReinstall,$btnOneDriveRemove,$LRemovingOneDriveWill,$btnBloatwareReinstall,$btnBloatwareRemove,$LItsRecommandedToRemo,$LMsStore,$LOneDrive,$LBloatware,$LRemovalSection)) $panelOptimization.Controls.AddRange(@($btnSetServicesToManual,$LService,$LOptimization,$btnRevert,$btnOptimize,$LOptimizedescription)) $panelMenu.Controls.AddRange(@($btnAbout,$btnBackupRestore,$btnSystemSettings,$btnRemovalSection,$btnOptimization,$panelLogo)) $Ps.Controls.AddRange(@($panelMenu,$panelOptimization,$panelRemovalSection,$panelsysset,$panelrestore,$panelAbout)) $panelLogo.Controls.Add($picturebox1) Write-Host ' >>> Verifying Powertool commands. So "Piracy" can be prevented' -ForegroundColor cyan $btnOptimization.add_Click({ $panelOptimization.Visible = $true $panelAbout.Visible = $false $panelrestore.Visible = $false $panelsysset.Visible = $false $panelRemovalSection.Visible = $false }) $btnRemovalSection.add_Click({ $panelRemovalSection.Visible = $true $panelAbout.Visible = $false $panelrestore.Visible = $false $panelsysset.Visible = $false $panelOptimization.Visible = $false }) $btnSystemSettings.add_Click({ $panelsysset.Visible = $true $panelAbout.Visible = $false $panelrestore.Visible = $false $panelOptimization.Visible = $false $panelRemovalSection.Visible = $false }) $btnBackupRestore.add_Click({ $panelrestore.Visible = $true $panelAbout.Visible = $false $panelOptimization.Visible = $false $panelRemovalSection.Visible = $false $panelsysset.Visible = $false }) $btnAbout.add_Click({ $panelAbout.Visible = $true $panelOptimization.Visible = $false $panelRemovalSection.Visible = $false $panelsysset.Visible = $false $panelrestore.Visible = $false }) $btnOptimize.Add_Click({ ShowDialogInProgress # Getting offical ooshutup10, task run asynchronously to speedup the process $dir = (Get-Location).Path + "\OOSU10.exe" if( !(Test-Path $dir) ){$ws = New-Object System.Net.WebClient ; $ws.DownloadFileAsync("https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe", $dir)} Write-Host "`n`nTo make setting reversible. Creating Restore Point as a Backup...`nSystem Restore Point is a built-in windows feature" -ForegroundColor Cyan Enable-ComputerRestore -Drive "C:\" REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" /V "SystemRestorePointCreationFrequency" /T REG_DWORD /D 0 /F Checkpoint-Computer -Description "Revert Optimization (Automatic)" -RestorePointType "MODIFY_SETTINGS" Write-Host 'RestorePoint has been Created' -ForegroundColor green Write-Host "`nOptimizing with Recommended Settings." Write-Host "Please wait..." Write-Progress -Activity "Optimizing with Recommended Settings" -PercentComplete 0 -status "Progress: 0%" Write-Host "Disabling Microsoft data collection services." Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 0 Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Policies\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 0 Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 0 Disable-ScheduledTask -TaskName "Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" | Out-Null Disable-ScheduledTask -TaskName "Microsoft\Windows\Application Experience\ProgramDataUpdater" | Out-Null Disable-ScheduledTask -TaskName "Microsoft\Windows\Autochk\Proxy" | Out-Null Disable-ScheduledTask -TaskName "Microsoft\Windows\Customer Experience Improvement Program\Consolidator" | Out-Null Disable-ScheduledTask -TaskName "Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" | Out-Null Disable-ScheduledTask -TaskName "Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector" | Out-Null Write-Host "Preforming Performance Tweaks and disabling Telemetry via registry" Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DriverSearching" -Name "SearchOrderConfig" -Type DWord -Value 00000000 Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" -Name "SystemResponsiveness" -Type DWord -Value 0000000a Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" -Name "NetworkThrottlingIndex" -Type DWord -Value 0000000a Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control" -Name "WaitToKillServiceTimeout" -Type DWord -Value 2000 Set-ItemProperty -Path "HKLM:\Control Panel\Desktop" -Name "MenuShowDelay" -Type DWord -Value 0 Set-ItemProperty -Path "HKLM:\Control Panel\Desktop" -Name "WaitToKillAppTimeout" -Type DWord -Value 5000 Set-ItemProperty -Path "HKLM:\Control Panel\Desktop" -Name "HungAppTimeout" -Type DWord -Value 4000 Set-ItemProperty -Path "HKLM:\Control Panel\Desktop" -Name "AutoEndTasks" -Type DWord -Value 1 Set-ItemProperty -Path "HKLM:\Control Panel\Desktop" -Name "LowLevelHooksTimeout" -Type DWord -Value 00001000 Set-ItemProperty -Path "HKLM:\Control Panel\Desktop" -Name "WaitToKillServiceTimeout" -Type DWord -Value 00002000 Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" -Name "ClearPageFileAtShutdown" -Type DWord -Value 00000001 Set-ItemProperty -Path "HKLM:\SYSTEM\ControlSet001\Services\Ndu" -Name "Start" -Type DWord -Value 00000004 Set-ItemProperty -Path "HKLM:\Control Panel\Mouse" -Name "MouseHoverTime" -Type DWord -Value 00000010 Write-Progress -Activity "Optimizing with Recommended Settings" -PercentComplete 4 -status "Progress: 4%" Write-Host "Disabling start menu app suggestions." Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "ContentDeliveryAllowed" -Type DWord -Value 0 Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "OemPreInstalledAppsEnabled" -Type DWord -Value 0 Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "PreInstalledAppsEnabled" -Type DWord -Value 0 Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "PreInstalledAppsEverEnabled" -Type DWord -Value 0 Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SilentInstalledAppsEnabled" -Type DWord -Value 0 Set-ItemProperty -Path "HKCU:\SoftWare\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-338387Enabled" -Type DWord -Value 0 Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-338388Enabled" -Type DWord -Value 0 Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-338389Enabled" -Type DWord -Value 0 Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-353698Enabled" -Type DWord -Value 0 Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SystemPaneSuggestionsEnabled" -Type DWord -Value 0 If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent")) { New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Force | Out-Null } Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Name "DisableWindowsConsumerFeatures" -Type DWord -Value 1 Write-Progress -Activity "Optimizing with Recommended Settings" -PercentComplete 8 -status "Progress: 8%" Write-Host "Disabling windows User preformed Activity logging." Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "EnableActivityFeed" -Type DWord -Value 0 Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "PublishUserActivities" -Type DWord -Value 0 Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "UploadUserActivities" -Type DWord -Value 0 Write-Progress -Activity "Optimizing with Recommended Settings" -PercentComplete 12 -status "Progress: 12%" Write-Host "Disabling Geolocation Tracking." If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location")) { New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" -Force | Out-Null } Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" -Name "Value" -Type String -Value "Deny" Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" -Name "SensorPermissionState" -Type DWord -Value 0 Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\lfsvc\Service\Configuration" -Name "Status" -Type DWord -Value 0 Write-Progress -Activity "Optimizing with Recommended Settings" -PercentComplete 16 -status "Progress: 16%" Write-Host "Disabling microsoft personalized tips, ads, and recommendations." If (!(Test-Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\CloudContent")) { New-Item -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Force | Out-Null } Set-ItemProperty -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Name "DisableTailoredExperiencesWithDiagnosticData" -Type DWord -Value 1 Write-Progress -Activity "Optimizing with Recommended Settings" -PercentComplete 20 -status "Progress: 20%" Write-Host "Stopping Windows Feedback Experience program." If (!(Test-Path "HKCU:\SOFTWARE\Microsoft\Siuf\Rules")) { New-Item -Path "HKCU:\SOFTWARE\Microsoft\Siuf\Rules" -Force | Out-Null } Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Siuf\Rules" -Name "NumberOfSIUFInPeriod" -Type DWord -Value 0 Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" -Name "DoNotShowFeedbackNotifications" -Type DWord -Value 1 Disable-ScheduledTask -TaskName "Microsoft\Windows\Feedback\Siuf\DmClient" -ErrorAction SilentlyContinue | Out-Null Disable-ScheduledTask -TaskName "Microsoft\Windows\Feedback\Siuf\DmClientOnScenarioDownload" -ErrorAction SilentlyContinue | Out-Null Write-Progress -Activity "Optimizing with Recommended Settings" -PercentComplete 24 -status "Progress: 24%" Write-Host "Disabling automatic Maps updates." Set-ItemProperty -Path "HKLM:\SYSTEM\Maps" -Name "AutoUpdateEnabled" -Type DWord -Value 0 Write-Progress -Activity "Optimizing with Recommended Settings" -PercentComplete 28 -status "Progress: 28%" Write-Host "Disabling windows unique Advertising ID." If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo")) { New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo" | Out-Null } Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo" -Name "DisabledByGroupPolicy" -Type DWord -Value 1 Write-Progress -Activity "Optimizing with Recommended Settings" -PercentComplete 32 -status "Progress: 32%" Write-Host "Disabling Error reporting." Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "Disabled" -Type DWord -Value 1 Disable-ScheduledTask -TaskName "Microsoft\Windows\Windows Error Reporting\QueueReporting" | Out-Null Write-Progress -Activity "Optimizing with Recommended Settings" -PercentComplete 36 -status "Progress: 36%" Write-Host "Restricting Windows Update P2P only to local network." If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config")) { New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" | Out-Null } Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" -Name "DODownloadMode" -Type DWord -Value 1 Write-Progress -Activity "Optimizing with Recommended Settings" -PercentComplete 40 -status "Progress: 40%" Write-Host "Stopping and disabling Diagnostics Tracking Service." Stop-Service "DiagTrack" -WarningAction SilentlyContinue Set-Service "DiagTrack" -StartupType Disabled Write-Progress -Activity "Optimizing with Recommended Settings" -PercentComplete 44 -status "Progress: 44%" Write-Host "Stopping and disabling WAP Push Service." Stop-Service "dmwappushservice" -WarningAction SilentlyContinue Set-Service "dmwappushservice" -StartupType Disabled Write-Progress -Activity "Optimizing with Recommended Settings" -PercentComplete 48 -status "Progress: 48%" Write-Host "Enabling F8 boot menu options." bcdedit /set `{current`} bootmenupolicy Legacy | Out-Null Write-Progress -Activity "Optimizing with Recommended Settings" -PercentComplete 52 -status "Progress: 52%" Write-Host "Stopping and disabling Home Groups services." Stop-Service "HomeGroupListener" -WarningAction SilentlyContinue Set-Service "HomeGroupListener" -StartupType Disabled Stop-Service "HomeGroupProvider" -WarningAction SilentlyContinue Set-Service "HomeGroupProvider" -StartupType Disabled Write-Progress -Activity "Optimizing with Recommended Settings" -PercentComplete 56 -status "Progress: 56%" Write-Host "Disabling Remote Assistance." Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Remote Assistance" -Name "fAllowToGetHelp" -Type DWord -Value 0 Write-Progress -Activity "Optimizing with Recommended Settings" -PercentComplete 60 -status "Progress: 60%" Write-Host "Disabling Storage Sense." Remove-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy" -Recurse -ErrorAction SilentlyContinue Write-Progress -Activity "Optimizing with Recommended Settings" -PercentComplete 64 -status "Progress: 64%" Write-Host "Stopping and disabling Superfetch service." Stop-Service "SysMain" -WarningAction SilentlyContinue Set-Service "SysMain" -StartupType Disabled # Setting BIOS time to UTC. #Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" -Name "RealTimeIsUniversal" -Type DWord -Value 1 Write-Progress -Activity "Optimizing with Recommended Settings" -PercentComplete 68 -status "Progress: 68%" Write-Host "Disabling Hibernation." Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Session Manager\Power" -Name "HibernteEnabled" -Type Dword -Value 0 If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FlyoutMenuSettings")) { New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FlyoutMenuSettings" | Out-Null } Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FlyoutMenuSettings" -Name "ShowHibernateOption" -Type Dword -Value 0 Write-Progress -Activity "Optimizing with Recommended Settings" -PercentComplete 72 -status "Progress: 72%" Write-Host "Showing file operations details." If (!(Test-Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\OperationStatusManager")) { New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\OperationStatusManager" | Out-Null } Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\OperationStatusManager" -Name "EnthusiastMode" -Type DWord -Value 1 Write-Progress -Activity "Optimizing with Recommended Settings" -PercentComplete 76 -status "Progress: 76%" # Hiding Task View button. Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ShowTaskViewButton" -Type DWord -Value 0 Write-Progress -Activity "Optimizing with Recommended Settings" -PercentComplete 80 -status "Progress: 80%" Write-Host "Hiding People icon." If (!(Test-Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People")) { New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People" | Out-Null } Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People" -Name "PeopleBand" -Type DWord -Value 0 Write-Host "DNS cache cleanup" ipconfig /flushdns | Out-Null Write-Progress -Activity "Optimizing with Recommended Settings" -PercentComplete 84 -status "Progress: 84%" Write-Host "Enabling NumLock after startup." If (!(Test-Path "HKU:")) { New-PSDrive -Name HKU -PSProvider Registry -Root HKEY_USERS | Out-Null } Set-ItemProperty -Path "HKU:\.DEFAULT\Control Panel\Keyboard" -Name "InitialKeyboardIndicators" -Type DWord -Value 2147483650 Add-Type -AssemblyName System.Windows.Forms If (!([System.Windows.Forms.Control]::IsKeyLocked('NumLock'))) { $wsh = New-Object -ComObject WScript.Shell $wsh.SendKeys('{NUMLOCK}') } # Changing default Explorer view to This PC. #Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "LaunchTo" -Type DWord -Value 1 Write-Progress -Activity "Optimizing with Recommended Settings" -PercentComplete 88 -status "Progress: 88%" Write-Host "Hiding 3D Objects icon from This PC." Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}" -Recurse -ErrorAction SilentlyContinue Write-Progress -Activity "Optimizing with Recommended Settings" -PercentComplete 92 -status "Progress: 92%" Write-Host "Network Tweaking." Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" -Name "IRPStackSize" -Type DWord -Value 20 Write-Progress -Activity "Optimizing with Recommended Settings" -PercentComplete 96 -status "Progress: 96%" Write-Host "Group svchost.exe processes." $ram = (Get-CimInstance -ClassName Win32_PhysicalMemory | Measure-Object -Property Capacity -Sum).Sum / 1kb Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control" -Name "SvcHostSplitThresholdInKB" -Type DWord -Value $ram -Force # Installing Windows Media Player. #Enable-WindowsOptionalFeature -Online -FeatureName "WindowsMediaPlayer" -NoRestart -WarningAction SilentlyContinue | Out-Null Write-Progress -Activity "Optimizing with Recommended Settings" -PercentComplete 100 -status "Progress: 100%" -Completed # Configuring ooshutup10 Write-Host "Finishing Optimization Delivery." $webClient = New-Object System.Net.WebClient [void]$webClient.OpenRead("https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe") [Int64]$fileSize = $webClient.ResponseHeaders["Content-Length"] while($ws.IsBusy){Start-Sleep -m 300 $receiveSize = (Get-Item ./OOSU10.exe).Length $i = [math]::floor($receiveSize / $fileSize * 100) Write-Progress -Activity "Finishing Optimization Delivery..." -Status "Progress: $i%" -PercentComplete $i } Write-Progress -Activity "Finishing Optimization Delivery..." -Completed $value = "P001`t+`nP002`t+`nP003`t+`nP004`t+`nP005`t+`nP006`t+`nP008`t+`nP026`t+`nP027`t+`nP028`t+`nP064`t+`nP065`t+`nP066`t+`nP067`t+`nP070`t+`nP069`t+`nP009`t-`nP010`t+`nP015`t-`nP068`t-`nP016`t+`nA001`t+`nA002`t+`nA003`t+`nA004`t-`nA006`t-`nA005`t+`nP007`t+`nP036`t+`nP025`t+`nP033`t+`nP023`t+`nP056`t-`nP057`t-`nP012`t-`nP034`t-`nP013`t-`nP035`t-`nP062`t-`nP063`t-`nP081`t-`nP047`t-`nP019`t-`nP048`t-`nP049`t-`nP020`t-`nP037`t-`nP011`t-`nP038`t-`nP050`t-`nP051`t-`nP018`t-`nP039`t-`nP021`t-`nP040`t-`nP022`t-`nP041`t-`nP014`t-`nP042`t-`nP052`t-`nP053`t-`nP054`t-`nP055`t-`nP029`t-`nP043`t-`nP030`t-`nP044`t-`nP031`t-`nP045`t-`nP032`t-`nP046`t-`nP058`t-`nP059`t-`nP060`t-`nP061`t-`nP024`t+`nS001`t-`nS002`t+`nS003`t+`nS008`t-`nE101`t+`nE115`t-`nE118`t+`nE107`t-`nE111`t+`nE112`t-`nE109`t-`nE121`t+`nE103`t-`nE123`t+`nE124`t-`nE119`t-`nE120`t-`nE122`t-`nE106`t+`nE001`t+`nE002`t+`nE003`t+`nE008`t+`nE007`t-`nE010`t-`nE011`t+`nE012`t-`nE009`t-`nE004`t-`nE005`t+`nE013`t+`nE014`t+`nE006`t+`nY001`t+`nY002`t+`nY003`t+`nY004`t+`nY005`t+`nY006`t+`nY007`t+`nC012`t+`nC002`t+`nC013`t+`nC007`t+`nC008`t+`nC009`t+`nC010`t+`nC011`t+`nC014`t+`nL001`t+`nL003`t+`nL004`t-`nL005`t-`nU001`t+`nU004`t+`nU005`t+`nU006`t+`nU007`t+`nW001`t+`nW011`t+`nW004`t-`nW005`t-`nW010`t-`nW009`t+`nP017`t+`nW006`t-`nW008`t-`nM006`t+`nM011`t-`nM010`t+`nO003`t-`nO001`t-`nS012`t+`nS013`t+`nS014`t+`nK001`t+`nK002`t+`nK005`t+`nM022`t+`nM001`t+`nM004`t+`nM005`t+`nM003`t-`nM012`t-`nM013`t-`nM014`t-`nM015`t+`nM016`t-`nM017`t+`nM018`t+`nM019`t-`nM020`t-`nM023`t+`nN001`t-" Set-Content -Value $value -Path Optimize.cfg ./OOSU10.exe Optimize.cfg /quiet Write-Host "Applying Quick Animation." -ForegroundColor cyan Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "DragFullWindows" -Type String -Value 1 Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "MenuShowDelay" -Type String -Value 200 Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "UserPreferencesMask" -Type Binary -Value ([byte[]](144,18,3,128,16,0,0,0)) Set-ItemProperty -Path "HKCU:\Control Panel\Desktop\WindowMetrics" -Name "MinAnimate" -Type String -Value 0 Set-ItemProperty -Path "HKCU:\Control Panel\Keyboard" -Name "KeyboardDelay" -Type DWord -Value 0 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ListviewAlphaSelect" -Type DWord -Value 0 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ListviewShadow" -Type DWord -Value 0 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "TaskbarAnimations" -Type DWord -Value 0 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects" -Name "VisualFXSetting" -Type DWord -Value 3 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\DWM" -Name "EnableAeroPeek" -Type DWord -Value 0 Write-Host "Optimization Completed. Restart required for settings to take effect." -ForegroundColor green HideDialogInProgress }) $btnRevert.Add_Click({ ShowDialogInProgress Write-Host "`nReversing PowerTool Optimization." Write-Host "Please wait.." # Getting offical ooshutup10 if not already exist, task run asynchronously to speedup the process $dir = (Get-Location).Path + "\OOSU10.exe" if( !(Test-Path $dir) ){$ws = New-Object System.Net.WebClient ; $ws.DownloadFileAsync("https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe", $dir)} Write-Progress -Activity "Reversing PowerTool Optimization" -PercentComplete 0 -status "Progress: 0%" Write-Host "Enabling Microsoft data collection Telemetry via registry." Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 1 Set-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Policies\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 1 Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" -Name "AllowTelemetry" -Type DWord -Value 1 Write-Progress -Activity "Reversing PowerTool Optimization" -PercentComplete 5 -status "Progress: 5%" Write-Host "Enabling start menu app suggestions." Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "ContentDeliveryAllowed" -Type DWord -Value 1 Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "OemPreInstalledAppsEnabled" -Type DWord -Value 1 Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "PreInstalledAppsEnabled" -Type DWord -Value 1 Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "PreInstalledAppsEverEnabled" -Type DWord -Value 1 Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SilentInstalledAppsEnabled" -Type DWord -Value 1 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-338387Enabled" -Type DWord -Value 1 Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-338388Enabled" -Type DWord -Value 1 Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-338389Enabled" -Type DWord -Value 1 Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SubscribedContent-353698Enabled" -Type DWord -Value 1 Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" -Name "SystemPaneSuggestionsEnabled" -Type DWord -Value 1 If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent")) { Remove-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Recurse -ErrorAction SilentlyContinue } Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Name "DisableWindowsConsumerFeatures" -Type DWord -Value 0 Write-Progress -Activity "Reversing PowerTool Optimization" -PercentComplete 10 -status "Progress: 10%" Write-Host "Enabling windows User preformed Activity logging." Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "EnableActivityFeed" -Type DWord -Value 1 Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "PublishUserActivities" -Type DWord -Value 1 Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "UploadUserActivities" -Type DWord -Value 1 Write-Progress -Activity "Reversing PowerTool Optimization" -PercentComplete 15 -status "Progress: 15%" Write-Host "Enabling Geolocation Tracking." If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location")) { Remove-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" -Recurse -ErrorAction SilentlyContinue } Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" -Name "Value" -Type String -Value "Allow" Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" -Name "SensorPermissionState" -Type DWord -Value 1 Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\lfsvc\Service\Configuration" -Name "Status" -Type DWord -Value 1 Write-Progress -Activity "Reversing PowerTool Optimization" -PercentComplete 20 -status "Progress: 20%" Write-Host "Enabling automatic Maps updates." Set-ItemProperty -Path "HKLM:\SYSTEM\Maps" -Name "AutoUpdateEnabled" -Type DWord -Value 1 Write-Progress -Activity "Reversing PowerTool Optimization" -PercentComplete 25 -status "Progress: 25%" Write-Host "Enabling Windows Feedback Experience program." If (!(Test-Path "HKCU:\SOFTWARE\Microsoft\Siuf\Rules")) { Remove-Item -Path "HKCU:\SOFTWARE\Microsoft\Siuf\Rules" -Recurse -ErrorAction SilentlyContinue } Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Siuf\Rules" -Name "NumberOfSIUFInPeriod" -Type DWord -Value 0 Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DataCollection" -Name "DoNotShowFeedbackNotifications" -Type DWord -Value 0 Write-Progress -Activity "Reversing PowerTool Optimization" -PercentComplete 30 -status "Progress: 30%" Write-Host "Enabling microsoft personalized tips, ads, and recommendations." If (!(Test-Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\CloudContent")) { Remove-Item -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Recurse -ErrorAction SilentlyContinue } Set-ItemProperty -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\CloudContent" -Name "DisableTailoredExperiencesWithDiagnosticData" -Type DWord -Value 0 Write-Progress -Activity "Reversing PowerTool Optimization" -PercentComplete 35 -status "Progress: 35%" Write-Host "Enabling windows unique Advertising ID." If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo")) { Remove-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo" -Recurse -ErrorAction SilentlyContinue } Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AdvertisingInfo" -Name "DisabledByGroupPolicy" -Type DWord -Value 0 Write-Progress -Activity "Reversing PowerTool Optimization" -PercentComplete 40 -status "Progress: 40%" Write-Host "Allowing Error reporting." Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting" -Name "Disabled" -Type DWord -Value 0 Write-Progress -Activity "Reversing PowerTool Optimization" -PercentComplete 45 -status "Progress: 45%" Write-Host "Allowing Diagnostics Tracking Service." Stop-Service "DiagTrack" -WarningAction SilentlyContinue Set-Service "DiagTrack" -StartupType Manual Write-Progress -Activity "Reversing PowerTool Optimization" -PercentComplete 50 -status "Progress: 50%" Write-Host "Allowing WAP Push Service." Stop-Service "dmwappushservice" -WarningAction SilentlyContinue Set-Service "dmwappushservice" -StartupType Manual Write-Progress -Activity "Reversing PowerTool Optimization" -PercentComplete 55 -status "Progress: 55%" Write-Host "Allowing Home Groups services." Stop-Service "HomeGroupListener" -WarningAction SilentlyContinue Set-Service "HomeGroupListener" -StartupType Manual Stop-Service "HomeGroupProvider" -WarningAction SilentlyContinue Set-Service "HomeGroupProvider" -StartupType Manual Write-Progress -Activity "Reversing PowerTool Optimization" -PercentComplete 60 -status "Progress: 60%" Write-Host "Enabling Storage Sense." New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy" | Out-Null Write-Progress -Activity "Reversing PowerTool Optimization" -PercentComplete 65 -status "Progress: 65%" Write-Host "Allowing Superfetch service." Stop-Service "SysMain" -WarningAction SilentlyContinue Set-Service "SysMain" -StartupType Manual # "Setting BIOS time to Local Time instead of UTC." #Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" -Name "RealTimeIsUniversal" -Type DWord -Value 0 Write-Progress -Activity "Reversing PowerTool Optimization" -PercentComplete 70 -status "Progress: 70%" Write-Host "Enabling Hibernation." Set-ItemProperty -Path "HKLM:\System\CurrentControlSet\Control\Session Manager\Power" -Name "HibernteEnabled" -Type Dword -Value 1 Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FlyoutMenuSettings" -Name "ShowHibernateOption" -Type Dword -Value 1 Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization" -Name "NoLockScreen" -ErrorAction SilentlyContinue Write-Progress -Activity "Reversing PowerTool Optimization" -PercentComplete 75 -status "Progress: 75%" Write-Host "Hiding file operations details." If (!(Test-Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\OperationStatusManager")) { Remove-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\OperationStatusManager" -Recurse -ErrorAction SilentlyContinue } Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\OperationStatusManager" -Name "EnthusiastMode" -Type DWord -Value 0 Write-Progress -Activity "Reversing PowerTool Optimization" -PercentComplete 80 -status "Progress: 80%" # Showing Task View button Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ShowTaskViewButton" -Type DWord -Value 1 Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\People" -Name "PeopleBand" -Type DWord -Value 1 # "Changing default Explorer view to Quick Access." #Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "LaunchTo" -Type DWord -Value 0 Write-Progress -Activity "Reversing PowerTool Optimization" -PercentComplete 88 -status "Progress: 88%" $value = "P001`t-`nP002`t-`nP003`t-`nP004`t-`nP005`t-`nP006`t-`nP008`t-`nP026`t-`nP027`t-`nP028`t-`nP064`t-`nP065`t-`nP066`t-`nP067`t-`nP070`t-`nP069`t-`nP009`t-`nP010`t-`nP015`t-`nP068`t-`nP016`t-`nA001`t-`nA002`t-`nA003`t-`nA004`t-`nA006`t-`nA005`t-`nP007`t-`nP036`t-`nP025`t-`nP033`t-`nP023`t-`nP056`t-`nP057`t-`nP012`t-`nP034`t-`nP013`t-`nP035`t-`nP062`t-`nP063`t-`nP081`t-`nP047`t-`nP019`t-`nP048`t-`nP049`t-`nP020`t-`nP037`t-`nP011`t-`nP038`t-`nP050`t-`nP051`t-`nP018`t-`nP039`t-`nP021`t-`nP040`t-`nP022`t-`nP041`t-`nP014`t-`nP042`t-`nP052`t-`nP053`t-`nP054`t-`nP055`t-`nP029`t-`nP043`t-`nP030`t-`nP044`t-`nP031`t-`nP045`t-`nP032`t-`nP046`t-`nP058`t-`nP059`t-`nP060`t-`nP061`t-`nP024`t-`nS001`t-`nS002`t-`nS003`t-`nS008`t-`nE101`t-`nE115`t-`nE118`t-`nE107`t-`nE111`t-`nE112`t-`nE109`t-`nE121`t-`nE103`t-`nE123`t-`nE119`t-`nE120`t-`nE122`t-`nE106`t-`nE001`t-`nE002`t-`nE003`t-`nE008`t-`nE007`t-`nE010`t-`nE011`t-`nE012`t-`nE009`t-`nE004`t-`nE005`t-`nE013`t-`nE014`t-`nE006`t-`nF002`t-`nF001`t-`nF003`t-`nF004`t-`nF005`t-`nY001`t-`nY002`t-`nY003`t-`nY004`t-`nY005`t-`nY006`t-`nY007`t-`nC012`t-`nC002`t-`nC013`t-`nC007`t-`nC008`t-`nC009`t-`nC010`t-`nC011`t-`nC014`t-`nL001`t-`nL003`t-`nL004`t-`nL005`t-`nU001`t-`nU004`t-`nU005`t-`nW001`t-`nW011`t-`nW004`t-`nW005`t-`nW010`t-`nW009`t-`nP017`t-`nW006`t-`nW008`t-`nM006`t-`nM011`t-`nM010`t-`nO003`t-`nO001`t-`nS012`t-`nS013`t-`nS014`t-`nK001`t-`nK002`t-`nK005`t-`nM022`t-`nM001`t-`nM004`t-`nM005`t-`nM003`t-`nM012`t-`nM013`t-`nM014`t-`nM015`t-`nM016`t-`nM017`t-`nM018`t-`nM019`t-`nM020`t-`nM023`t-`nN001`t-" Set-Content -Value $value -Path Revert.cfg while($ws.IsBusy){Start-Sleep -m 300} ./OOSU10.exe Revert.cfg /quiet Write-Progress -Activity "Reversing PowerTool Optimization" -PercentComplete 100 -status "Progress: 100%" -Completed Write-Host "Optimization Reverted - But Restoring from restore point is recommanded.`nRestart required for settings to take effect." -ForegroundColor green HideDialogInProgress }) $btnSetServicesToManual.add_Click({ Write-Host "" $services = @( "ALG" # Application Layer Gateway Service(Provides support for 3rd party protocol plug-ins for Internet Connection Sharing) "AJRouter" # Needed for AllJoyn Router Service "BcastDVRUserService_48486de" # GameDVR and Broadcast is used for Game Recordings and Live Broadcasts "Browser" # Let users browse and locate shared resources in neighboring computers "BthAvctpSvc" # AVCTP service (needed for Bluetooth Audio Devices or Wireless Headphones) "CaptureService_48486de" # Optional screen capture functionality for applications that call the Windows.Graphics.Capture API. "cbdhsvc_48486de" # Clipboard Service "diagnosticshub.standardcollector.service" # Microsoft (R) Diagnostics Hub Standard Collector Service "DiagTrack" # Diagnostics Tracking Service "dmwappushservice" # WAP Push Message Routing Service "DPS" # Diagnostic Policy Service (Detects and Troubleshoots Potential Problems) "edgeupdate" # Edge Update Service "edgeupdatem" # Another Update Service "EntAppSvc" # Enterprise Application Management. "Fax" # Fax Service "fhsvc" # Fax History "FontCache" # Windows font cache "gupdate" # Google Update "gupdatem" # Another Google Update Service "iphlpsvc" # ipv6(Most websites use ipv4 instead) "lfsvc" # Geolocation Service "lmhosts" # TCP/IP NetBIOS Helper "MapsBroker" # Downloaded Maps Manager "MicrosoftEdgeElevationService" # Another Edge Update Service "MSDTC" # Distributed Transaction Coordinator "ndu" # Windows Network Data Usage Monitor (Disabling Breaks Task Manager Per-Process Network Monitoring) "NetTcpPortSharing" # Net.Tcp Port Sharing Service "PcaSvc" # Program Compatibility Assistant Service "PerfHost" # Remote users and 64-bit processes to query performance. "PhoneSvc" # Phone Service(Manages the telephony state on the device) "PrintNotify" # Windows printer notifications and extentions "QWAVE" # Quality Windows Audio Video Experience (audio and video might sound worse) "RemoteAccess" # Routing and Remote Access "RemoteRegistry" # Remote Registry "RetailDemo" # Demo Mode for Store Display "RtkBtManServ" # Realtek Bluetooth Device Manager Service "SCardSvr" # Windows Smart Card Service "seclogon" # Secondary Logon (Disables other credentials only password will work) "SEMgrSvc" # Payments and NFC/SE Manager (Manages payments and Near Field Communication (NFC) based secure elements) "SharedAccess" # Internet Connection Sharing (ICS) "stisvc" # Windows Image Acquisition (WIA) "SysMain" # Analyses System Usage and Improves Performance "TrkWks" # Distributed Link Tracking Client "WerSvc" # Windows error reporting "wisvc" # Windows Insider program(Windows Insider will not work if Disabled) "WMPNetworkSvc" # Windows Media Player Network Sharing Service "WpcMonSvc" # Parental Controls "WPDBusEnum" # Portable Device Enumerator Service "WpnService" # WpnService (Push Notifications may not work) #"XblAuthManager" # Xbox Live Auth Manager (Disabling Breaks Xbox Live Games) #"XblGameSave" # Xbox Live Game Save Service (Disabling Breaks Xbox Live Games) #"XboxNetApiSvc" # Xbox Live Networking Service (Disabling Breaks Xbox Live Games) #"XboxGipSvc" # Xbox Accessory Management Service "HPAppHelperCap" "HPDiagsCap" "HPNetworkCap" "HPSysInfoCap" "HpTouchpointAnalyticsService" "HvHost" "vmicguestinterface" "vmicheartbeat" "vmickvpexchange" "vmicrdv" "vmicshutdown" "vmictimesync" "vmicvmsession" ) $count = 1 foreach ($service in $services) { # -ErrorAction SilentlyContinue is so it doesn't write an error to stdout if a service doesn't exist $serviceinfo = Get-Service -Name $service -ErrorAction SilentlyContinue if ($serviceinfo.StartType -eq "Automatic"){ Write-Host "Setting $service StartupType to Manual" $count += $service.count } $serviceinfo | Set-Service -StartupType Manual -ErrorAction SilentlyContinue } $Totalcount = $count-1 if($Totalcount -ne 0){ Write-Host "`nTotal $Totalcount Services set from Automatic to Manual." -ForegroundColor Green }else{ Write-Host "Found no services from Selected list or Already set to manual." -ForegroundColor cyan } }) $Bloatware = @( #Unnecessary Windows 10 AppX Apps "Microsoft.ZuneVideo" "Microsoft.AppConnector" #"Microsoft.XboxApp" "Microsoft.BingSports" "Microsoft.BingTranslator" #"Microsoft.BingWeather" "Microsoft.BingFoodAndDrink" "Microsoft.Messaging" "Microsoft.BingHealthAndFitness" "Microsoft.WindowsFeedbackHub" "Microsoft.CommsPhone" "Microsoft.Microsoft3DViewer" "Microsoft.3DBuilder" "Microsoft.BingTravel" "Microsoft.MinecraftUWP" "microsoft.windowscommunicationsapps" "Microsoft.ZuneMusic" "Microsoft.Office.Lens" "Microsoft.GamingServices" #"Microsoft.XboxGameOverlay" "Microsoft.ScreenSketch" "Microsoft.GetHelp" "Microsoft.Wallet" "Microsoft.Microsoft3DViewer" "Microsoft.MicrosoftSolitaireCollection" "Microsoft.NetworkSpeedTest" "Microsoft.BingNews" "Microsoft.Office.Sway" "Microsoft.Office.OneNote" "Microsoft.OneConnect" "Microsoft.BingFinance" "Microsoft.Getstarted" "Microsoft.Print3D" "Microsoft.SkypeApp" "Microsoft.Whiteboard" "Microsoft.News" #"Microsoft.WindowsPhone" #"Microsoft.XboxGameCallableUI" "Microsoft.WindowsMaps" "Microsoft.MicrosoftOfficeHub" "Microsoft.ConnectivityStore" "Microsoft.Getstarted" "Microsoft.WindowsAlarms" "Microsoft.People" #"Microsoft.Xbox.TCUI" #"Microsoft.XboxIdentityProvider" "Microsoft.WindowsSoundRecorder" #"Microsoft.XboxSpeechToTextOverlay" "Microsoft.MixedReality.Portal" #"Microsoft.YourPhone" #Sponsored Windows 10 AppX Apps #Add sponsored/featured apps to remove in the "*AppName*" format "*Sway*" "*Netflix*" "*OneCalendar*" "*LinkedInforWindows*" "*PandoraMediaInc*" "*CandyCrush*" "*HiddenCityMysteryofShadows*" "*Hulu*" "*Facebook*" "*Wunderlist*" "*Dolby*" "*HiddenCity*" "*ActiproSoftwareLLC*" "*AdobePhotoshopExpress*" "*ACGMediaPlayer*" "*AdobeSystemsIncorporated.AdobePhotoshopExpress*" "*EclipseManager*" "*Twitter*" "*Speed Test*" "*Viber*" "*Duolingo-LearnLanguagesforFree*" "*BubbleWitch3Saga*" "*HotspotShieldFreeVPN*" "*Royal Revolt*" "*Flipboard*" #Optional: Typically not removed but you can if you need to for some reason "*Microsoft.Advertising.Xaml*" #"*Microsoft.MSPaint*" #"*Microsoft.MicrosoftStickyNotes*" #"*Microsoft.Windows.Photos*" #"*Microsoft.WindowsCalculator*" ) $btnBloatwareRemove.Add_Click({ ShowDialogInProgress Write-Host "" foreach ($Bloat in $Bloatware) { Get-AppxPackage -Name $Bloat| Remove-AppxPackage #Get-AppxProvisionedPackage -Online | Where-Object DisplayName -like $Bloat | Remove-AppxProvisionedPackage -Online Write-Host "Attempting to remove $Bloat." } #Stops edge from taking over as the default .PDF viewer Write-Host "Stopping Edge from taking over as the default .PDF viewer" # Identify the edge application class $Packages = "HKCU:SOFTWARE\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\Repository\Packages" $edge = Get-ChildItem $Packages -Recurse -include "MicrosoftEdge" # Specify the paths to the file and URL associations $FileAssocKey = Join-Path $edge.PSPath Capabilities\FileAssociations $URLAssocKey = Join-Path $edge.PSPath Capabilities\URLAssociations # get the software classes for the file and URL types that Edge will associate $FileTypes = Get-Item $FileAssocKey $URLTypes = Get-Item $URLAssocKey $FileAssoc = Get-ItemProperty $FileAssocKey $URLAssoc = Get-ItemProperty $URLAssocKey $Associations = @() $Filetypes.Property | foreach {$Associations += $FileAssoc.$_} $URLTypes.Property | foreach {$Associations += $URLAssoc.$_} # add registry values in each software class to stop edge from associating as the default foreach ($Association in $Associations) { $Class = Join-Path HKCU:SOFTWARE\Classes $Association #if (Test-Path $class) # {write-host $Association} # Get-Item $Class Set-ItemProperty $Class -Name NoOpenWith -Value "" Set-ItemProperty $Class -Name NoStaticDefaultVerb -Value "" } #Removes Paint3D stuff from context menu $Paint3Dstuff = @( "HKCR:\SystemFileAssociations\.3mf\Shell\3D Edit" "HKCR:\SystemFileAssociations\.bmp\Shell\3D Edit" "HKCR:\SystemFileAssociations\.fbx\Shell\3D Edit" "HKCR:\SystemFileAssociations\.gif\Shell\3D Edit" "HKCR:\SystemFileAssociations\.jfif\Shell\3D Edit" "HKCR:\SystemFileAssociations\.jpe\Shell\3D Edit" "HKCR:\SystemFileAssociations\.jpeg\Shell\3D Edit" "HKCR:\SystemFileAssociations\.jpg\Shell\3D Edit" "HKCR:\SystemFileAssociations\.png\Shell\3D Edit" "HKCR:\SystemFileAssociations\.tif\Shell\3D Edit" "HKCR:\SystemFileAssociations\.tiff\Shell\3D Edit" ) #Rename reg key to remove it, so it's revertible foreach ($Paint3D in $Paint3Dstuff) { If (Test-Path $Paint3D) { $rmPaint3D = $Paint3D + "_" Set-Item $Paint3D $rmPaint3D } } Write-Host "Finished Removing Bloatware... Restart required" -ForegroundColor Green HideDialogInProgress }) $btnBloatwareReinstall.Add_Click({ ShowDialogInProgress Write-Host "" Write-Host "`nReinstalling Bloatware" foreach ($Bloat in $Bloatware) { Add-AppxPackage -DisableDevelopmentMode -Register "$($(Get-AppxPackage -AllUsers $Bloat).InstallLocation)\AppXManifest.xml" Write-Host "Attempting to add $Bloat." } Write-Host "Finished Reinstalling Bloatware Apps... Restart required" -ForegroundColor Green HideDialogInProgress }) $btnOneDriveRemove.Add_Click({ $msgBody = 'OneDrive is Integrated into windows If you have not Configured OneDrive before and microsoft account is not signed in, then its completely safe to remove. But if you have Configured OneDrive, Removing OneDrive will remove all files from "desktop and Document foulder" and puts them to OneDrive bin. Make sure to save your file to other location and logout from microsoft account then proceed. YES to proceed or NO to cancel.' $Result = [System.Windows.MessageBox]::Show($msgBody,"Warning Removing OneDrive","YesNoCancel","Information") if($Result -eq "Yes") { ShowDialogInProgress Write-Host "`nRemoving OneDrive. it can take upto 1 minute. Please Wait..." If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\OneDrive")) { New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\OneDrive" | Out-Null } Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\OneDrive" -Name "DisableFileSyncNGSC" -Type DWord -Value 1 Stop-Process -Name "OneDrive" -ErrorAction SilentlyContinue Start-Sleep -s 2 $onedrive = "$env:SYSTEMROOT\SysWOW64\OneDriveSetup.exe" If (!(Test-Path $onedrive)) { $onedrive = "$env:SYSTEMROOT\System32\OneDriveSetup.exe" } Start-Process $onedrive "/uninstall" -NoNewWindow -Wait Stop-Process -Name "explorer" -ErrorAction SilentlyContinue Start-Sleep -s 2 Remove-Item -Path "$env:USERPROFILE\OneDrive" -Force -Recurse -ErrorAction SilentlyContinue Remove-Item -Path "$env:LOCALAPPDATA\Microsoft\OneDrive" -Force -Recurse -ErrorAction SilentlyContinue Remove-Item -Path "$env:PROGRAMDATA\Microsoft OneDrive" -Force -Recurse -ErrorAction SilentlyContinue Remove-Item -Path "$env:SYSTEMDRIVE\OneDriveTemp" -Force -Recurse -ErrorAction SilentlyContinue If (!(Test-Path "HKCR:")) { New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT | Out-Null } Remove-Item -Path "HKCR:\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" -Recurse -ErrorAction SilentlyContinue Remove-Item -Path "HKCR:\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" -Recurse -ErrorAction SilentlyContinue Write-Host "OneDrive successfully Removed..." -ForegroundColor green HideDialogInProgress } }) $btnOneDriveReinstall.Add_Click({ Write-Host "`nReinstalling Onedrive. Please Wait..." Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\OneDrive" -Name "DisableFileSyncNGSC" -ErrorAction SilentlyContinue $onedrive = "$env:SYSTEMROOT\SysWOW64\OneDriveSetup.exe" If (!(Test-Path $onedrive)) { $onedrive = "$env:SYSTEMROOT\System32\OneDriveSetup.exe" } Start-Process $onedrive Write-Host "Finished Sending Command to OneDrive Setup..." -ForegroundColor green }) $btnMsStoreRemove.Add_Click({ ShowDialogInProgress Write-Host "`nRemoving Microsoft Store..." Get-AppxPackage -Name "*Microsoft.WindowsStore*"| Remove-AppxPackage #Get-AppxProvisionedPackage -Online | Where-Object DisplayName -like "*Microsoft.WindowsStore*" | Remove-AppxProvisionedPackage -Online Write-Host "Microsoft Store successfully Removed..." -ForegroundColor green HideDialogInProgress }) $btnMsStoreReinstall.Add_Click({ ShowDialogInProgress Write-Host "`nReinstalling Microsoft Store..." Get-AppxPackage -allusers Microsoft.WindowsStore | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"} Write-Host "Done..." -ForegroundColor green HideDialogInProgress }) $btnEnPowerThrottlin.add_Click({ Write-Host "`nEnabling Power Throttling..." Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Power\PowerThrottling" -Name "PowerThrottlingOff" -Type DWord -Value 00000000 Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Power" -Name "HiberbootEnabled" -Type DWord -Value 0000001 Write-Host "Done... Restart required" -ForegroundColor green }) $btnDisPowerThrottli.add_Click({ Write-Host "`nnDisabling Power Throttling..." Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Power\PowerThrottling" -Name "PowerThrottlingOff" -Type DWord -Value 00000001 Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Power" -Name "HiberbootEnabled" -Type DWord -Value 0000000 Write-Host "Done... Restart required" -ForegroundColor green }) $btnDarkMode.Add_Click({ Write-Host "`nSwitching to Dark Mode" Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 0 Write-Host "Done..." -ForegroundColor green }) $btnLightMode.Add_Click({ Write-Host "`nSwitching to Light Mode" Remove-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme Write-Host "Done..." -ForegroundColor green }) $btnDisCortana.Add_Click({ Write-Host "`nDisabling Cortana..." If (!(Test-Path "HKCU:\SOFTWARE\Microsoft\Personalization\Settings")) { New-Item -Path "HKCU:\SOFTWARE\Microsoft\Personalization\Settings" -Force | Out-Null } Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Personalization\Settings" -Name "AcceptedPrivacyPolicy" -Type DWord -Value 0 If (!(Test-Path "HKCU:\SOFTWARE\Microsoft\InputPersonalization")) { New-Item -Path "HKCU:\SOFTWARE\Microsoft\InputPersonalization" -Force | Out-Null } Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\InputPersonalization" -Name "RestrictImplicitTextCollection" -Type DWord -Value 1 Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\InputPersonalization" -Name "RestrictImplicitInkCollection" -Type DWord -Value 1 If (!(Test-Path "HKCU:\SOFTWARE\Microsoft\InputPersonalization\TrainedDataStore")) { New-Item -Path "HKCU:\SOFTWARE\Microsoft\InputPersonalization\TrainedDataStore" -Force | Out-Null } Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\InputPersonalization\TrainedDataStore" -Name "HarvestContacts" -Type DWord -Value 0 If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search")) { New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" -Force | Out-Null } Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" -Name "AllowCortana" -Type DWord -Value 0 Write-Host "Cortana has been disabled" -ForegroundColor green }) $btnEnCortana.Add_Click({ Write-Host "`nEnabling Cortana..." Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Personalization\Settings" -Name "AcceptedPrivacyPolicy" -ErrorAction SilentlyContinue If (!(Test-Path "HKCU:\SOFTWARE\Microsoft\InputPersonalization\TrainedDataStore")) { New-Item -Path "HKCU:\SOFTWARE\Microsoft\InputPersonalization\TrainedDataStore" -Force | Out-Null } Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\InputPersonalization" -Name "RestrictImplicitTextCollection" -Type DWord -Value 0 Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\InputPersonalization" -Name "RestrictImplicitInkCollection" -Type DWord -Value 0 Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\InputPersonalization\TrainedDataStore" -Name "HarvestContacts" -ErrorAction SilentlyContinue Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" -Name "AllowCortana" -ErrorAction SilentlyContinue Write-Host "Done..." -ForegroundColor green }) $btnQuickAnimation.Add_Click({ Write-Host "`nAdjusting visual effects for performance..." Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "DragFullWindows" -Type String -Value 1 Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "MenuShowDelay" -Type String -Value 200 Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "UserPreferencesMask" -Type Binary -Value ([byte[]](144,18,3,128,16,0,0,0)) Set-ItemProperty -Path "HKCU:\Control Panel\Desktop\WindowMetrics" -Name "MinAnimate" -Type String -Value 0 Set-ItemProperty -Path "HKCU:\Control Panel\Keyboard" -Name "KeyboardDelay" -Type DWord -Value 0 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ListviewAlphaSelect" -Type DWord -Value 0 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ListviewShadow" -Type DWord -Value 0 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "TaskbarAnimations" -Type DWord -Value 0 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects" -Name "VisualFXSetting" -Type DWord -Value 3 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\DWM" -Name "EnableAeroPeek" -Type DWord -Value 0 Write-Host "Done... Restart required" -ForegroundColor green }) $btnDefaultAnimation.Add_Click({ Write-Host "`nAdjusting visual effects back to Default settings..." Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "DragFullWindows" -Type String -Value 1 Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "UserPreferencesMask" -Type Binary -Value ([byte[]](158,62,7,128,18,0,0,0)) Set-ItemProperty -Path "HKCU:\Control Panel\Desktop\WindowMetrics" -Name "MinAnimate" -Type String -Value 1 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ListviewAlphaSelect" -Type DWord -Value 1 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ListviewShadow" -Type DWord -Value 1 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "TaskbarAnimations" -Type DWord -Value 1 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects" -Name "VisualFXSetting" -Type DWord -Value 0 Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\DWM" -Name "EnableAeroPeek" -Type DWord -Value 1 Write-Host "Done... Restart required" -ForegroundColor green }) $btnUltraPowerMode.Add_Click({ $powermode1 = Powercfg.exe /L if("$powermode1" -notmatch "Ultimate") { $batmode = Powercfg.exe -duplicatescheme e9a42b02-d5df-448d-aa00-03f14749eb61 > nul if("$batmode" -notmatch "Ultimate") { $ultifilepath = "$env:TEMP" + "\Ultimate_Performance.pow" $ulticode = "cmVnZgEAAAABAAAABt18K87O0wEBAAAAAwAAAAAAAAABAAAAIAAAAAAQAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHWb0tK/OugRlGAAFV0BfAJ1m9LSvzroEZRgABVdAXwCAAAAAHab0tK/OugRlGAAFV0BfAJybXRtAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOrL+vUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AUSAAAAAQEAAAAAAAUSAAAA2P///3ZrCwCyAAAAsAEAAAIAAAABABu2RGVzY3JpcHRpb24A4tlAaUj///9AACUAUwB5AHMAdABlAG0AUgBvAG8AdAAlAFwAcwB5AHMAdABlAG0AMwAyAFwAcABvAHcAcgBwAHIAbwBmAC4AZABsAGwALAAtADEAOAAsAFAAcgBvAHYAaQBkAGUAcwAgAHUAbAB0AGkAbQBhAHQAZQAgAHAAZQByAGYAbwByAG0AYQBuAGMAZQAgAG8AbgAgAGgAaQBnAGgAZQByACAAZQBuAGQAIABQAEMAcwAuAAAAAAXw////iAEAAHgCAAAAAAAA2P///3ZrDAB6AAAAoAIAAAIAAAABAAAARnJpZW5kbHlOYW1lAQEAAID///9AACUAUwB5AHMAdABlAG0AUgBvAG8AdAAlAFwAcwB5AHMAdABlAG0AMwAyAFwAcABvAHcAcgBwAHIAbwBmAC4AZABsAGwALAAtADEAOQAsAFUAbAB0AGkAbQBhAHQAZQAgAFAAZQByAGYAbwByAG0AYQBuAGMAZQAAAAAAiP///25rIADWiiJppcPTAQAAAAAgAAAAAQAAAAAAAACABAAA/////wAAAAD/////mAAAAP////9IAAAAAAAAAAAAAAAAAAAAAAAAACQAAAAwMDEyZWU0Ny05MDQxLTRiNWQtOWI3Ny01MzVmYmE4YjE0NDIAAAAAEAAAAGxmAQAgAwAAMDAxMoj///9uayAA1ooiaaXD0wEAAAAAIAMAAAAAAAAAAAAA//////////8CAAAASAQAAJgAAAD/////AAAAAAAAAAAcAAAABAAAAAAAAAAkAAAANjczOGUyYzQtZThhNS00YTQyLWIxNmEtZTA0MGU3Njk3NTZlAQEAANj///92aw4ABAAAgAAAAAAEAAAAAQAAAEFDU2V0dGluZ0luZGV4AADw////IAQAAFgEAAAAAAAA2P///3ZrDgAEAACAAAAAAAQAAAABAAAARENTZXR0aW5nSW5kZXgYAPD///9sZgEAqAMAADY3MziI////bmsgANaKImmlw9MBAAAAACAAAAAAAAAAAAAAAP//////////AgAAADAFAACYAAAA/////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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" [IO.File]::WriteAllBytes($ultifilepath, [Convert]::FromBase64String($ulticode)) powercfg.exe -IMPORT $ultifilepath $A = (powercfg.exe -l | findstr -i Ultimate).split() Powercfg.exe /S $A[3] del $ultifilepath }else{ $A = (powercfg.exe -l | findstr -i Ultimate).split() Powercfg.exe /S $A[3] } }else { $A = (powercfg.exe -l | findstr -i Ultimate).split() Powercfg.exe /S $A[3] } Write-Host "" Write-Host "Switched to UltraPower Mode" -ForegroundColor Green }) $btnBalancedMode.Add_Click({ $A = (powercfg.exe -l | findstr -i Balanced).split() Powercfg.exe /S $A[3] Write-Host "" Write-Host "Switched to Balanced mode" -ForegroundColor Green }) $btnEnActionCenter.Add_Click({ Write-Host "`nEnabling Action Center..." Remove-ItemProperty -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "DisableNotificationCenter" -ErrorAction SilentlyContinue Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\PushNotifications" -Name "ToastEnabled" -ErrorAction SilentlyContinue Write-Host "Done... Restart required" -ForegroundColor green }) $btnDisActionCenter.Add_Click({ Write-Host "`nDisabling Action Center..." If (!(Test-Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer")) { New-Item -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer" | Out-Null } Set-ItemProperty -Path "HKCU:\SOFTWARE\Policies\Microsoft\Windows\Explorer" -Name "DisableNotificationCenter" -Type DWord -Value 1 Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\PushNotifications" -Name "ToastEnabled" -Type DWord -Value 0 Write-Host "Done... Restart required" -ForegroundColor green }) $btnEnActivityHistory.add_Click({ Write-Host "`nEnabling Activity History..." Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "EnableActivityFeed" -Type DWord -Value 1 Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "PublishUserActivities" -Type DWord -Value 1 Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "UploadUserActivities" -Type DWord -Value 1 Write-Host "Done... Restart required" -ForegroundColor green }) $btnDisActivityHistory.add_Click({ Write-Host "`nDisabling Activity History..." Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "EnableActivityFeed" -Type DWord -Value 0 Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "PublishUserActivities" -Type DWord -Value 0 Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "UploadUserActivities" -Type DWord -Value 0 Write-Host "Done... Restart required" -ForegroundColor green }) $btnEnWebsearch.add_Click({ #Enables Web Search in Start Menu $WebSearch = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" Set-ItemProperty "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" BingSearchEnabled -Value 1 If (!(Test-Path $WebSearch)) { New-Item $WebSearch } Set-ItemProperty $WebSearch DisableWebSearch -Value 0 Write-Host "`nWeb Search in Start Menu has been Enabled" -ForegroundColor Green }) $btnDisWebsearch.add_Click({ #Disables Web Search in Start Menu $WebSearch = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" Set-ItemProperty "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" BingSearchEnabled -Value 0 If (!(Test-Path $WebSearch)) { New-Item $WebSearch } Set-ItemProperty $WebSearch DisableWebSearch -Value 1 Write-Host "`nWeb Search in Start Menu has been Disabled" -ForegroundColor Green }) $btnSetTimerResolution.Add_Click({ $nonea = bcdedit /set useplatformclock no $nonea = bcdedit /set useplatformtick yes $nonea = bcdedit /set disabledynamictick yes $ntqtrmin = $null $ntqtrmax = $null $ntqtrcur = $null $ntdesiredres = 5000 $ntsetres = $true $ntcurrentres = 156250 $MethodDefinition = @' [DllImport("ntdll.dll", SetLastError=true)] public static extern NtStatus NtQueryTimerResolution(out uint MinimumResolution, out uint MaximumResolution, out uint ActualResolution); [DllImport("ntdll.dll", SetLastError=true)] public static extern int NtSetTimerResolution(int DesiredResolution, bool SetResolution, out int CurrentResolution ); '@ $NtStatus = Add-Type -MemberDefinition $MethodDefinition -Name 'NtStatus' -Namespace 'Win32' -PassThru $ret1 = [Win32.NtStatus]::NtSetTimerResolution($ntdesiredres,$ntsetres,[ref]$ntcurrentres) [Win32.NtStatus]::NtQueryTimerResolution([ref]$ntqtrmin, [ref]$ntqtrmax, [ref]$ntqtrcur) Write-Host "`nSystem Timer Resolution is set to: $($ntqtrcur/1000) Microseconds." -ForegroundColor Green Write-Host "Your system Default Timer Resolution is: $($ntqtrmin/1000) Microseconds." Write-Host "Lower is Better..." }) $btnUndoTimerResolutio.Add_Click({ $nonea = bcdedit /set useplatformclock no $nonea = bcdedit /set useplatformtick yes $nonea = bcdedit /set disabledynamictick yes $ntqtrmin = $null $ntqtrmax = $null $ntqtrcur = $null $ntdesiredres = 156250 $ntsetres = $true $ntcurrentres = 156250 $MethodDefinition = @' [DllImport("ntdll.dll", SetLastError=true)] public static extern NtStatus NtQueryTimerResolution(out uint MinimumResolution, out uint MaximumResolution, out uint ActualResolution); [DllImport("ntdll.dll", SetLastError=true)] public static extern int NtSetTimerResolution(int DesiredResolution, bool SetResolution, out int CurrentResolution ); '@ $NtStatus = Add-Type -MemberDefinition $MethodDefinition -Name 'NtStatus' -Namespace 'Win32' -PassThru $ret1 = [Win32.NtStatus]::NtSetTimerResolution($ntdesiredres,$ntsetres,[ref]$ntcurrentres) [Win32.NtStatus]::NtQueryTimerResolution([ref]$ntqtrmin, [ref]$ntqtrmax, [ref]$ntqtrcur) Write-Host "`nSystem Timer Resolution is set to: $($ntqtrcur/1000) Microseconds. (Default)" -ForegroundColor Green Write-Host "Your system Default Timer Resolution is: $($ntqtrmin/1000) Microseconds." Write-Host "Lower is Better..." }) $btnEnBackgroundApps.Add_Click({ Write-Host "`nAllowing Background Apps..." Get-ChildItem -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" -Exclude "Microsoft.Windows.Cortana*" | ForEach { Remove-ItemProperty -Path $_.PsPath -Name "Disabled" -ErrorAction SilentlyContinue Remove-ItemProperty -Path $_.PsPath -Name "DisabledByUser" -ErrorAction SilentlyContinue } Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" -Name "GlobalUserDisabled" -Type DWord -Value 0 Write-Host "Done - Reverted to Stock Settings" }) $btnDisBackgroundApps.Add_Click({ Write-Host "`nDisabling Background application access..." Get-ChildItem -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" -Exclude "Microsoft.Windows.Cortana*" | ForEach { Set-ItemProperty -Path $_.PsPath -Name "Disabled" -Type DWord -Value 1 Set-ItemProperty -Path $_.PsPath -Name "DisabledByUser" -Type DWord -Value 1 } Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications" -Name "GlobalUserDisabled" -Type DWord -Value 1 Write-Host "Background application has been Disabled" -ForegroundColor green }) $btnEnNetPer.add_Click({ Write-Host "`nEnabling Network Performance." # disabling Network Throttling Index to Gain better ping If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile")) { New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" | Out-Null } Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" -Name "NetworkThrottlingIndex" -Type Dword -Value "4294967295" # Limiting windows Reserve Bandwidth bandwidth to 0. so user and windows both gets equal network If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Psched")) { New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Psched" | Out-Null } Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Psched" -Name "NonBestEffortLimit" -Type Dword -Value "0" #dns clear ipconfig /flushdns | Out-Null Write-Host "Done... Restart required" -ForegroundColor Green }) $btnDisNetPer.add_Click({ Write-Host "`nDisabling Network Performance." # enabling Network Throttling Index If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile")) { New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" | Out-Null } Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Multimedia\SystemProfile" -Name "NetworkThrottlingIndex" -Type Dword -Value "10" # removing Limit from windows Reserve Bandwidth bandwidth, now window will get priority over user activity(Default) Remove-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Psched" | Out-Null #dns clear ipconfig /flushdns | Out-Null Write-Host "Done... Restart required" -ForegroundColor Green }) $btnEnNewNinterest.add_Click({ Write-Host "`nEnabling News and Interests." Remove-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Feeds" | Out-Null If (!(Test-Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Feeds")) { New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Feeds" | Out-Null } Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Feeds" -Name "ShellFeedsTaskbarViewMode" -Type DWord -Value 0 Write-Host "Done... Restart required" -ForegroundColor Green }) $btnDisNewNinterest.add_Click({ Write-Host "`nDisabling News and Interests." If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Feeds")) { New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Feeds" | Out-Null } Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Feeds" -Name "EnableFeeds" -Type DWord -Value 0 If (!(Test-Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Feeds")) { New-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Feeds" | Out-Null } Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Feeds" -Name "ShellFeedsTaskbarViewMode" -Type DWord -Value 2 Write-Host "Done... Restart required" -ForegroundColor Green }) $btnDiskCleanup.Add_Click({ Write-Host "`nLaunching Disk Cleanup..." cleanmgr.exe }) $btnResetWindowsUpdate.Add_Click({ ShowDialogInProgress Write-Host "`n1. Stopping Windows Update Services..." Stop-Service -Name BITS Stop-Service -Name wuauserv Stop-Service -Name appidsvc Stop-Service -Name cryptsvc Write-Host "2. Remove QMGR Data file..." Remove-Item "$env:allusersprofile\Application Data\Microsoft\Network\Downloader\qmgr*.dat" -ErrorAction SilentlyContinue Write-Host "3. Renaming the Software Distribution and CatRoot Folder..." Rename-Item $env:systemroot\SoftwareDistribution SoftwareDistribution.bak -ErrorAction SilentlyContinue Rename-Item $env:systemroot\System32\Catroot2 catroot2.bak -ErrorAction SilentlyContinue Write-Host "4. Removing old Windows Update log..." Remove-Item $env:systemroot\WindowsUpdate.log -ErrorAction SilentlyContinue Write-Host "5. Resetting the Windows Update Services to defualt settings..." "sc.exe sdset bits D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)" "sc.exe sdset wuauserv D:(A;;CCLCSWRPWPDTLOCRRC;;;SY)(A;;CCDCLCSWRPWPDTLOCRSDRCWDWO;;;BA)(A;;CCLCSWLOCRRC;;;AU)(A;;CCLCSWRPWPDTLOCRRC;;;PU)" Set-Location $env:systemroot\system32 Write-Host "6. Registering some DLLs..." regsvr32.exe /s atl.dll regsvr32.exe /s urlmon.dll regsvr32.exe /s mshtml.dll regsvr32.exe /s shdocvw.dll regsvr32.exe /s browseui.dll regsvr32.exe /s jscript.dll regsvr32.exe /s vbscript.dll regsvr32.exe /s scrrun.dll regsvr32.exe /s msxml.dll regsvr32.exe /s msxml3.dll regsvr32.exe /s msxml6.dll regsvr32.exe /s actxprxy.dll regsvr32.exe /s softpub.dll regsvr32.exe /s wintrust.dll regsvr32.exe /s dssenh.dll regsvr32.exe /s rsaenh.dll regsvr32.exe /s gpkcsp.dll regsvr32.exe /s sccbase.dll regsvr32.exe /s slbcsp.dll regsvr32.exe /s cryptdlg.dll regsvr32.exe /s oleaut32.dll regsvr32.exe /s ole32.dll regsvr32.exe /s shell32.dll regsvr32.exe /s initpki.dll regsvr32.exe /s wuapi.dll regsvr32.exe /s wuaueng.dll regsvr32.exe /s wuaueng1.dll regsvr32.exe /s wucltui.dll regsvr32.exe /s wups.dll regsvr32.exe /s wups2.dll regsvr32.exe /s wuweb.dll regsvr32.exe /s qmgr.dll regsvr32.exe /s qmgrprxy.dll regsvr32.exe /s wucltux.dll regsvr32.exe /s muweb.dll regsvr32.exe /s wuwebv.dll Write-Host "7) Removing WSUS client settings..." REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v AccountDomainSid /f REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v PingID /f REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v SusClientId /f Write-Host "8) Resetting the WinSock..." netsh winsock reset netsh winhttp reset proxy Write-Host "9) Delete all BITS jobs..." Get-BitsTransfer | Remove-BitsTransfer Write-Host "10) Attempting to install the Windows Update Agent..." if($arch -eq 64){ wusa Windows8-RT-KB2937636-x64 /quiet } else{ wusa Windows8-RT-KB2937636-x86 /quiet } Write-Host "11) Starting Windows Update Services..." Start-Service -Name BITS Start-Service -Name wuauserv Start-Service -Name appidsvc Start-Service -Name cryptsvc Write-Host "12) Forcing discovery..." wuauclt /resetauthorization /detectnow Write-Host "Process complete. Please Restart your computer." -ForegroundColor green HideDialogInProgress }) $btnCreateRestorePoint.Add_Click({ ShowDialogInProgress Enable-ComputerRestore -Drive "C:\" REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" /V "SystemRestorePointCreationFrequency" /T REG_DWORD /D 0 /F Checkpoint-Computer -Description "Revert Optimization" -RestorePointType "MODIFY_SETTINGS" Write-Host "`nRestorePoint has been Created" -ForegroundColor green HideDialogInProgress }) $btnRestore.Add_Click({ rstrui.exe }) $btnOfficialSite.add_Click({ Start-Process "https://bit.ly/3Fr4ECw" }) iex($SecureString)