Last active
September 20, 2022 01:23
-
-
Save meetnick/bc113c61bc95d4ac90b5adab1be3f615 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add-Type -AssemblyName PresentationCore,PresentationFramework | |
Add-Type -AssemblyName System.Windows.Forms | |
[System.Windows.Forms.Application]::EnableVisualStyles() | |
$ErrorActionPreference = 'SilentlyContinue' | |
$wshell = New-Object -ComObject Wscript.Shell | |
$Button = [System.Windows.MessageBoxButton]::YesNo | |
$ErrorIco = [System.Windows.MessageBoxImage]::None | |
$Ask = 'Do you want to run this as an Administrator? | |
"Yes" to Run as an Administrator | |
"No" to not run this as an Administrator.' | |
If (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]'Administrator')) { | |
$Prompt = [System.Windows.MessageBox]::Show($Ask, "Windows Powershell (Trusted)", $Button, $ErrorIco) | |
Switch ($Prompt) { | |
#This will debloat Windows 10 | |
Yes { | |
Write-Host "You didn't run this script as an Administrator. This script will self elevate to run as an Administrator and continue." | |
Exit | |
} | |
No { | |
Break | |
} | |
} | |
} | |
$Form = New-Object system.Windows.Forms.Form | |
$Form.ClientSize = New-Object System.Drawing.Point(1030,580) | |
$Form.text = "Windows ToolKit" | |
$Form.TopMost = $false | |
$Panel1 = New-Object system.Windows.Forms.Panel | |
$Panel1.height = 156 | |
$Panel1.width = 1032 | |
$Panel1.location = New-Object System.Drawing.Point(9,100) | |
$activatewin = New-Object system.Windows.Forms.Button | |
$activatewin.text = "Activate Window 8/10" | |
$activatewin.width = 190 | |
$activatewin.height = 45 | |
$activatewin.location = New-Object System.Drawing.Point(805,500) | |
$activatewin.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',13) | |
$ActivateMSoffice = New-Object system.Windows.Forms.Button | |
$ActivateMSoffice.text = "Activate MS Office" | |
$ActivateMSoffice.width = 190 | |
$ActivateMSoffice.height = 45 | |
$ActivateMSoffice.location = New-Object System.Drawing.Point(600,500) | |
$ActivateMSoffice.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',13) | |
$Createrestorepoint = New-Object system.Windows.Forms.Button | |
$Createrestorepoint.text = "Create Restore Point" | |
$Createrestorepoint.width = 190 | |
$Createrestorepoint.height = 45 | |
$Createrestorepoint.location = New-Object System.Drawing.Point(35,500) | |
$Createrestorepoint.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',12) | |
$Restorebackup = New-Object system.Windows.Forms.Button | |
$Restorebackup.text = "Restore" | |
$Restorebackup.width = 90 | |
$Restorebackup.height = 45 | |
$Restorebackup.location = New-Object System.Drawing.Point(240,500) | |
$Restorebackup.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',12) | |
$help = New-Object system.Windows.Forms.Button | |
$help.text = "Help" | |
$help.width = 80 | |
$help.height = 45 | |
$help.location = New-Object System.Drawing.Point(345,500) | |
$help.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',12) | |
$Panel2 = New-Object system.Windows.Forms.Panel | |
$Panel2.height = 159 | |
$Panel2.width = 588 | |
$Panel2.location = New-Object System.Drawing.Point(9,70) | |
$Label3 = New-Object system.Windows.Forms.Label | |
$Label3.text = "System Tweaks" | |
$Label3.AutoSize = $true | |
$Label3.width = 230 | |
$Label3.height = 25 | |
$Label3.location = New-Object System.Drawing.Point(195,25) | |
$Label3.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',24) | |
$essentialtweaks = New-Object system.Windows.Forms.Button | |
$essentialtweaks.text = "Essential Tweaks" | |
$essentialtweaks.width = 200 | |
$essentialtweaks.height = 115 | |
$essentialtweaks.location = New-Object System.Drawing.Point(24,34) | |
$essentialtweaks.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',13) | |
$UltraPowermode = New-Object system.Windows.Forms.Button | |
$UltraPowermode.text = "UltraPower Mode" | |
$UltraPowermode.width = 150 | |
$UltraPowermode.height = 30 | |
$UltraPowermode.location = New-Object System.Drawing.Point(251,45) | |
$UltraPowermode.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',11) | |
$EnableLocation = New-Object system.Windows.Forms.Button | |
$EnableLocation.text = "Enable Location" | |
$EnableLocation.width = 150 | |
$EnableLocation.height = 30 | |
$EnableLocation.location = New-Object System.Drawing.Point(251,82) | |
$EnableLocation.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',11) | |
$HTrayIcons = New-Object system.Windows.Forms.Button | |
$HTrayIcons.text = "Hide Tray Icons" | |
$HTrayIcons.width = 150 | |
$HTrayIcons.height = 30 | |
$HTrayIcons.location = New-Object System.Drawing.Point(417,119) | |
$HTrayIcons.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',11) | |
$BalanceMode = New-Object system.Windows.Forms.Button | |
$BalanceMode.text = "Balance Mode" | |
$BalanceMode.width = 150 | |
$BalanceMode.height = 30 | |
$BalanceMode.location = New-Object System.Drawing.Point(251,9) | |
$BalanceMode.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',11) | |
$darkmode = New-Object system.Windows.Forms.Button | |
$darkmode.text = "Dark Mode" | |
$darkmode.width = 150 | |
$darkmode.height = 30 | |
$darkmode.location = New-Object System.Drawing.Point(417,7) | |
$darkmode.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',11) | |
$visualfx = New-Object system.Windows.Forms.Button | |
$visualfx.text = "Fast Animation" | |
$visualfx.width = 150 | |
$visualfx.height = 30 | |
$visualfx.location = New-Object System.Drawing.Point(417,82) | |
$visualfx.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',11) | |
$DisableOneDrive = New-Object system.Windows.Forms.Button | |
$DisableOneDrive.text = "Disable OneDrive" | |
$DisableOneDrive.width = 150 | |
$DisableOneDrive.height = 30 | |
$DisableOneDrive.location = New-Object System.Drawing.Point(251,119) | |
$DisableOneDrive.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',11) | |
$Panel3 = New-Object system.Windows.Forms.Panel | |
$Panel3.height = 158 | |
$Panel3.width = 440 | |
$Panel3.location = New-Object System.Drawing.Point(601,70) | |
$Label4 = New-Object system.Windows.Forms.Label | |
$Label4.text = "Security" | |
$Label4.AutoSize = $true | |
$Label4.width = 117 | |
$Label4.height = 25 | |
$Label4.location = New-Object System.Drawing.Point(761,25) | |
$Label4.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',24) | |
$securitylow = New-Object system.Windows.Forms.Button | |
$securitylow.text = "Low" | |
$securitylow.width = 150 | |
$securitylow.height = 30 | |
$securitylow.location = New-Object System.Drawing.Point(36,119) | |
$securitylow.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',14,[System.Drawing.FontStyle]([System.Drawing.FontStyle]::Bold)) | |
$securityhigh = New-Object system.Windows.Forms.Button | |
$securityhigh.text = "High" | |
$securityhigh.width = 150 | |
$securityhigh.height = 30 | |
$securityhigh.location = New-Object System.Drawing.Point(244,119) | |
$securityhigh.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',14,[System.Drawing.FontStyle]([System.Drawing.FontStyle]::Bold)) | |
$Label5 = New-Object system.Windows.Forms.Label | |
$Label5.text = "- Set UAC to Never Prompt" | |
$Label5.AutoSize = $true | |
$Label5.width = 150 | |
$Label5.height = 10 | |
$Label5.location = New-Object System.Drawing.Point(24,25) | |
$Label5.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10) | |
$Label6 = New-Object system.Windows.Forms.Label | |
$Label6.text = "- Disable Windows Defender" | |
$Label6.AutoSize = $true | |
$Label6.width = 150 | |
$Label6.height = 10 | |
$Label6.location = New-Object System.Drawing.Point(24,6) | |
$Label6.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10) | |
$Label8 = New-Object system.Windows.Forms.Label | |
$Label8.text = "- Disable Windows Scan" | |
$Label8.AutoSize = $true | |
$Label8.width = 150 | |
$Label8.height = 10 | |
$Label8.location = New-Object System.Drawing.Point(24,61) | |
$Label8.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10) | |
$Label9 = New-Object system.Windows.Forms.Label | |
$Label9.text = "- Disable Meltdown Flag" | |
$Label9.AutoSize = $true | |
$Label9.width = 150 | |
$Label9.height = 10 | |
$Label9.location = New-Object System.Drawing.Point(24,43) | |
$Label9.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10) | |
$Label10 = New-Object system.Windows.Forms.Label | |
$Label10.text = "- Set UAC to Always Prompt" | |
$Label10.AutoSize = $true | |
$Label10.width = 25 | |
$Label10.height = 10 | |
$Label10.location = New-Object System.Drawing.Point(233,25) | |
$Label10.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10) | |
$Label11 = New-Object system.Windows.Forms.Label | |
$Label11.text = "- Enable Windows Defender" | |
$Label11.AutoSize = $true | |
$Label11.width = 25 | |
$Label11.height = 10 | |
$Label11.location = New-Object System.Drawing.Point(233,6) | |
$Label11.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10) | |
$Label12 = New-Object system.Windows.Forms.Label | |
$Label12.text = "- Enable Windows Scan" | |
$Label12.AutoSize = $true | |
$Label12.width = 25 | |
$Label12.height = 10 | |
$Label12.location = New-Object System.Drawing.Point(233,61) | |
$Label12.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10) | |
$Label13 = New-Object system.Windows.Forms.Label | |
$Label13.text = "- Enable Meltdown Flag" | |
$Label13.AutoSize = $true | |
$Label13.width = 25 | |
$Label13.height = 10 | |
$Label13.location = New-Object System.Drawing.Point(233,43) | |
$Label13.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10) | |
$Label15 = New-Object system.Windows.Forms.Label | |
$Label15.text = "Windows Update" | |
$Label15.AutoSize = $true | |
$Label15.width = 25 | |
$Label15.height = 10 | |
$Label15.location = New-Object System.Drawing.Point(58,250) | |
$Label15.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',24) | |
$Panel4 = New-Object system.Windows.Forms.Panel | |
$Panel4.height = 168 | |
$Panel4.width = 340 | |
$Panel4.location = New-Object System.Drawing.Point(9,300) | |
$defaultwindowsupdate = New-Object system.Windows.Forms.Button | |
$defaultwindowsupdate.text = "Default Settings" | |
$defaultwindowsupdate.width = 300 | |
$defaultwindowsupdate.height = 30 | |
$defaultwindowsupdate.location = New-Object System.Drawing.Point(25,10) | |
$defaultwindowsupdate.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',13) | |
$securitywindowsupdate = New-Object system.Windows.Forms.Button | |
$securitywindowsupdate.text = "Security Updates Only" | |
$securitywindowsupdate.width = 300 | |
$securitywindowsupdate.height = 30 | |
$securitywindowsupdate.location = New-Object System.Drawing.Point(25,127) | |
$securitywindowsupdate.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',13) | |
$Label16 = New-Object system.Windows.Forms.Label | |
$Label16.text = "Recommended doing security updates only." | |
$Label16.AutoSize = $true | |
$Label16.width = 25 | |
$Label16.height = 10 | |
$Label16.location = New-Object System.Drawing.Point(47,49) | |
$Label16.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10) | |
$Label17 = New-Object system.Windows.Forms.Label | |
$Label17.text = "- Delays Features updates up to 3 years" | |
$Label17.AutoSize = $true | |
$Label17.width = 25 | |
$Label17.height = 10 | |
$Label17.location = New-Object System.Drawing.Point(60,66) | |
$Label17.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10) | |
$Label18 = New-Object system.Windows.Forms.Label | |
$Label18.text = "- Delays Security updates 4 days" | |
$Label18.AutoSize = $true | |
$Label18.width = 25 | |
$Label18.height = 10 | |
$Label18.location = New-Object System.Drawing.Point(60,84) | |
$Label18.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10) | |
$Label19 = New-Object system.Windows.Forms.Label | |
$Label19.text = "- Sets Maximum Active Time" | |
$Label19.AutoSize = $true | |
$Label19.width = 25 | |
$Label19.height = 10 | |
$Label19.location = New-Object System.Drawing.Point(60,103) | |
$Label19.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10) | |
$Label22 = New-Object system.Windows.Forms.Label | |
$Label22.text = "(Unsure!?... Just apply)" | |
$Label22.AutoSize = $true | |
$Label22.width = 150 | |
$Label22.height = 10 | |
$Label22.location = New-Object System.Drawing.Point(50,14) | |
$Label22.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10) | |
$lightmode = New-Object system.Windows.Forms.Button | |
$lightmode.text = "Light Mode" | |
$lightmode.width = 150 | |
$lightmode.height = 30 | |
$lightmode.location = New-Object System.Drawing.Point(417,45) | |
$lightmode.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',11) | |
#///////////////////Restore script/////////////////////////////// | |
$Label20 = New-Object system.Windows.Forms.Label | |
$Label20.text = "Additional Options" | |
$Label20.AutoSize = $true | |
$Label20.width = 169 | |
$Label20.height = 23 | |
$Label20.location = New-Object System.Drawing.Point(581,250) | |
$Label20.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',24) | |
$Panel5 = New-Object system.Windows.Forms.Panel | |
$Panel5.height = 168 | |
$Panel5.width = 615 | |
$Panel5.location = New-Object System.Drawing.Point(380,300) | |
#$Panel5.BorderStyle = "FixedSingle" | |
$actioncenter = New-Object system.Windows.Forms.Button | |
$actioncenter.text = "Disable Action Center" | |
$actioncenter.width = 190 | |
$actioncenter.height = 30 | |
$actioncenter.location = New-Object System.Drawing.Point(5,48) | |
$actioncenter.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',11) | |
$cortana = New-Object system.Windows.Forms.Button | |
$cortana.text = "Disable Cortana" | |
$cortana.width = 190 | |
$cortana.height = 30 | |
$cortana.location = New-Object System.Drawing.Point(5,10) | |
$cortana.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',11) | |
$windowssearch = New-Object system.Windows.Forms.Button | |
$windowssearch.text = "Disable Windows Search" | |
$windowssearch.width = 190 | |
$windowssearch.height = 30 | |
$windowssearch.location = New-Object System.Drawing.Point(5,86) | |
$windowssearch.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',11) | |
$backgroundapps = New-Object system.Windows.Forms.Button | |
$backgroundapps.text = "Disable Background Apps" | |
$backgroundapps.width = 190 | |
$backgroundapps.height = 30 | |
$backgroundapps.location = New-Object System.Drawing.Point(5,125) | |
$backgroundapps.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',11) | |
$EnableCortana = New-Object system.Windows.Forms.Button | |
$EnableCortana.text = "Enable Cortana" | |
$EnableCortana.width = 190 | |
$EnableCortana.height = 30 | |
$EnableCortana.location = New-Object System.Drawing.Point(210,10) | |
$EnableCortana.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',11) | |
$EnableActionCenter = New-Object system.Windows.Forms.Button | |
$EnableActionCenter.text = "Enable Action Center" | |
$EnableActionCenter.width = 190 | |
$EnableActionCenter.height = 30 | |
$EnableActionCenter.location = New-Object System.Drawing.Point(210,48) | |
$EnableActionCenter.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',11) | |
$EnableWindowsSearch = New-Object system.Windows.Forms.Button | |
$EnableWindowsSearch.text = "Enable Windows Search" | |
$EnableWindowsSearch.width = 190 | |
$EnableWindowsSearch.height = 30 | |
$EnableWindowsSearch.location = New-Object System.Drawing.Point(210,86) | |
$EnableWindowsSearch.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',11) | |
$EnableBackgroundApps = New-Object system.Windows.Forms.Button | |
$EnableBackgroundApps.text = "Enable Background Apps" | |
$EnableBackgroundApps.width = 190 | |
$EnableBackgroundApps.height = 30 | |
$EnableBackgroundApps.location = New-Object System.Drawing.Point(210,125) | |
$EnableBackgroundApps.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',11) | |
$RestoreWDefenderIcon = New-Object system.Windows.Forms.Button | |
$RestoreWDefenderIcon.text = "Restore Defender Icon" | |
$RestoreWDefenderIcon.width = 190 | |
$RestoreWDefenderIcon.height = 30 | |
$RestoreWDefenderIcon.location = New-Object System.Drawing.Point(425,10) | |
$RestoreWDefenderIcon.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',11) | |
$EnableClipboardHistory = New-Object system.Windows.Forms.Button | |
$EnableClipboardHistory.text = "Enable Clipboard History" | |
$EnableClipboardHistory.width = 190 | |
$EnableClipboardHistory.height = 30 | |
$EnableClipboardHistory.location = New-Object System.Drawing.Point(425,48) | |
$EnableClipboardHistory.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',11) | |
$deltempfiles = New-Object system.Windows.Forms.Button | |
$deltempfiles.text = "Delete Temporary files" | |
$deltempfiles.width = 190 | |
$deltempfiles.height = 30 | |
$deltempfiles.location = New-Object System.Drawing.Point(425,86) | |
$deltempfiles.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',11) | |
$RemoveMsStore = New-Object system.Windows.Forms.Button | |
$RemoveMsStore.text = "Remove Ms Store" | |
$RemoveMsStore.width = 190 | |
$RemoveMsStore.height = 30 | |
$RemoveMsStore.location = New-Object System.Drawing.Point(425,124) | |
$RemoveMsStore.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',11) | |
#/////////////////////////////////////////////////////////////// | |
$Form.controls.AddRange(@($Panel2,$Panel3,$Panel4,$Panel5,$Label3,$Label4,$Label15,$Label20,$Createrestorepoint,$Restorebackup,$help,$activatewin,$ActivateMSoffice)) | |
$Panel2.controls.AddRange(@($essentialtweaks,$BalanceMode,$UltraPowermode,$EnableLocation,$HTrayIcons,$darkmode,$visualfx,$DisableOneDrive,$Label22,$lightmode)) | |
$Panel3.controls.AddRange(@($securitylow,$securityhigh,$Label5,$Label6,$Label8,$Label9,$Label10,$Label11,$Label12,$Label13)) | |
$Panel4.controls.AddRange(@($defaultwindowsupdate,$securitywindowsupdate,$Label16,$Label17,$Label18,$Label19)) | |
$Panel5.controls.AddRange(@($actioncenter,$EnableActionCenter,$backgroundapps,$windowssearch,$cortana,$EnableCortana,$EnableWindowsSearch,$EnableBackgroundApps,$RestoreWDefenderIcon,$EnableClipboardHistory,$deltempfiles,$RemoveMsStore)) | |
$essentialtweaks.Add_Click({ | |
Write-Host "Creating Restore Point incase something bad happens" | |
Enable-ComputerRestore -Drive "C:\" | |
Checkpoint-Computer -Description "Window Toolkit" -RestorePointType "MODIFY_SETTINGS" | |
Write-Host "Running O&O Shutup with Recommended Settings" | |
Import-Module BitsTransfer choco install shutup10 -y | |
Start-BitsTransfer -Source "https://raw.githubusercontent.com/ChrisTitusTech/win10script/master/ooshutup10.cfg" -Destination ooshutup10.cfg | |
Start-BitsTransfer -Source "https://dl5.oo-software.com/files/ooshutup10/OOSU10.exe" -Destination OOSU10.exe | |
./OOSU10.exe ooshutup10.cfg /quiet | |
Write-Host "Disabling Telemetry..." | |
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 "Disabling Application 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-Host "Disabling 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 "Disabling Location 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-Host "Disabling automatic Maps updates..." | |
Set-ItemProperty -Path "HKLM:\SYSTEM\Maps" -Name "AutoUpdateEnabled" -Type DWord -Value 0 | |
Write-Host "Disabling Feedback..." | |
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-Host "Disabling Tailored Experiences..." | |
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-Host "Disabling 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-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-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-Host "Stopping and disabling Diagnostics Tracking Service..." | |
Stop-Service "DiagTrack" -WarningAction SilentlyContinue | |
Set-Service "DiagTrack" -StartupType Disabled | |
Write-Host "Stopping and disabling WAP Push Service..." | |
Stop-Service "dmwappushservice" -WarningAction SilentlyContinue | |
Set-Service "dmwappushservice" -StartupType Disabled | |
Write-Host "Enabling F8 boot menu options..." | |
bcdedit /set `{current`} bootmenupolicy Legacy | Out-Null | |
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-Host "Disabling Remote Assistance..." | |
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Remote Assistance" -Name "fAllowToGetHelp" -Type DWord -Value 0 | |
Write-Host "Disabling Storage Sense..." | |
Remove-Item -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\StorageSense\Parameters\StoragePolicy" -Recurse -ErrorAction SilentlyContinue | |
Write-Host "Stopping and disabling Superfetch service..." | |
Stop-Service "SysMain" -WarningAction SilentlyContinue | |
Set-Service "SysMain" -StartupType Disabled | |
Write-Host "Setting BIOS time to UTC..." | |
#Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\TimeZoneInformation" -Name "RealTimeIsUniversal" -Type DWord -Value 1 | |
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-Host "Showing task manager details..." | |
$taskmgr = Start-Process -WindowStyle Hidden -FilePath taskmgr.exe -PassThru | |
Do { | |
Start-Sleep -Milliseconds 100 | |
$preferences = Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\TaskManager" -Name "Preferences" -ErrorAction SilentlyContinue | |
} Until ($preferences) | |
Stop-Process $taskmgr | |
$preferences.Preferences[28] = 0 | |
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\TaskManager" -Name "Preferences" -Type Binary -Value $preferences.Preferences | |
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-Host "Hiding Task View button..." | |
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "ShowTaskViewButton" -Type DWord -Value 0 | |
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 "Showing all tray icons..." | |
#Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" -Name "EnableAutoTray" -Type DWord -Value 0 | |
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}') | |
} | |
Write-Host "Changing default Explorer view to This PC..." | |
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "LaunchTo" -Type DWord -Value 1 | |
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 | |
$Bloatware = @( | |
#Unnecessary Windows 10 AppX Apps | |
"Microsoft.3DBuilder" | |
"Microsoft.AppConnector" | |
"Microsoft.BingFinance" | |
"Microsoft.BingNews" | |
"Microsoft.BingSports" | |
"Microsoft.BingTranslator" | |
"Microsoft.BingWeather" | |
"Microsoft.GetHelp" | |
"Microsoft.Getstarted" | |
"Microsoft.Messaging" | |
"Microsoft.Microsoft3DViewer" | |
"Microsoft.MicrosoftSolitaireCollection" | |
"Microsoft.NetworkSpeedTest" | |
"Microsoft.News" | |
"Microsoft.Office.Lens" | |
"Microsoft.Office.Sway" | |
"Microsoft.OneConnect" | |
"Microsoft.People" | |
"Microsoft.Print3D" | |
"Microsoft.SkypeApp" | |
"Microsoft.StorePurchaseApp" | |
"Microsoft.Wallet" | |
"Microsoft.Whiteboard" | |
"Microsoft.WindowsAlarms" | |
"microsoft.windowscommunicationsapps" | |
"Microsoft.WindowsFeedbackHub" | |
"Microsoft.WindowsMaps" | |
"Microsoft.WindowsSoundRecorder" | |
"Microsoft.ZuneMusic" | |
"Microsoft.ZuneVideo" | |
#Sponsored Windows 10 AppX Apps | |
#Add sponsored/featured apps to remove in the "*AppName*" format | |
"*EclipseManager*" | |
"*ActiproSoftwareLLC*" | |
"*AdobeSystemsIncorporated.AdobePhotoshopExpress*" | |
"*Duolingo-LearnLanguagesforFree*" | |
"*PandoraMediaInc*" | |
"*CandyCrush*" | |
"*BubbleWitch3Saga*" | |
"*Wunderlist*" | |
"*Flipboard*" | |
"*Twitter*" | |
"*Facebook*" | |
"*Royal Revolt*" | |
"*Sway*" | |
"*Speed Test*" | |
"*Dolby*" | |
"*Viber*" | |
"*ACGMediaPlayer*" | |
"*Netflix*" | |
"*OneCalendar*" | |
"*LinkedInforWindows*" | |
"*HiddenCityMysteryofShadows*" | |
"*Hulu*" | |
"*HiddenCity*" | |
"*AdobePhotoshopExpress*" | |
#Optional: Typically not removed but you can if you need to for some reason | |
#"*Microsoft.Advertising.Xaml_10.1712.5.0_x64__8wekyb3d8bbwe*" | |
#"*Microsoft.Advertising.Xaml_10.1712.5.0_x86__8wekyb3d8bbwe*" | |
#"*Microsoft.BingWeather*" | |
#"*Microsoft.MSPaint*" | |
#"*Microsoft.MicrosoftStickyNotes*" | |
#"*Microsoft.Windows.Photos*" | |
#"*Microsoft.WindowsCalculator*" | |
#"*Microsoft.WindowsStore*" | |
) | |
foreach ($Bloat in $Bloatware) { | |
Get-AppxPackage -Name $Bloat| Remove-AppxPackage | |
Get-AppxProvisionedPackage -Online | Where-Object DisplayName -like $Bloat | Remove-AppxProvisionedPackage -Online | |
Write-Host "Trying to remove $Bloat." | |
} | |
Write-Host "Installing Windows Media Player..." | |
Enable-WindowsOptionalFeature -Online -FeatureName "WindowsMediaPlayer" -NoRestart -WarningAction SilentlyContinue | Out-Null | |
#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 | |
} | |
} | |
$wshell.Popup("Operation Completed",0," Done",0x0) | |
}) | |
$windowssearch.Add_Click({ | |
Write-Host "Disabling Bing Search in Start Menu..." | |
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" -Name "BingSearchEnabled" -Type DWord -Value 0 | |
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" -Name "CortanaConsent" -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 "DisableWebSearch" -Type DWord -Value 1 | |
Write-Host "Stopping and disabling Windows Search indexing service..." | |
Stop-Service "WSearch" -WarningAction SilentlyContinue | |
Set-Service "WSearch" -StartupType Disabled | |
Write-Host "Hiding Taskbar Search icon / box..." | |
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" -Name "SearchboxTaskbarMode" -Type DWord -Value 0 | |
$wshell.Popup("Operation Completed",0," Done",0x0) | |
}) | |
$backgroundapps.Add_Click({ | |
Write-Host "Disabling 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 | |
} | |
$wshell.Popup("Operation Completed",0," Done",0x0) | |
}) | |
$ActivateMSoffice.Add_Click({ | |
$Form.WindowState = 1 | |
Add-Type -AssemblyName System.Windows.Forms | |
[System.Windows.Forms.Application]::EnableVisualStyles() | |
$ErrorActionPreference = 'SilentlyContinue' | |
$Formmini = New-Object system.Windows.Forms.Form | |
$Formmini.ClientSize = New-Object System.Drawing.Point(280,420) | |
$Formmini.text = "Activate MS Office" | |
$Formmini.TopMost = $true | |
$Panelmini1 = New-Object system.Windows.Forms.Panel | |
$Panelmini1.height = 400 | |
$Panelmini1.width = 260 | |
$Panelmini1.location = New-Object System.Drawing.Point(10,10) | |
$Panelmini1.BorderStyle = "FixedSingle" | |
$Labelmini1 = New-Object system.Windows.Forms.Label | |
$Labelmini1.text = "All Versions are Supported" | |
$Labelmini1.AutoSize = $true | |
$Labelmini1.width = 100 | |
$Labelmini1.height = 23 | |
$Labelmini1.location = New-Object System.Drawing.Point(11,20) | |
$Labelmini1.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',14) | |
$msoffice1013 = New-Object system.Windows.Forms.Button | |
$msoffice1013.text = "Microsoft Office 2010/2013" | |
$msoffice1013.width = 200 | |
$msoffice1013.height = 30 | |
$msoffice1013.location = New-Object System.Drawing.Point(30,70) | |
$msoffice1013.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10) | |
$msoffice16 = New-Object system.Windows.Forms.Button | |
$msoffice16.text = "Microsoft Office 2016" | |
$msoffice16.width = 200 | |
$msoffice16.height = 30 | |
$msoffice16.location = New-Object System.Drawing.Point(30,110) | |
$msoffice16.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10) | |
$msoffice19 = New-Object system.Windows.Forms.Button | |
$msoffice19.text = "Microsoft Office 2019" | |
$msoffice19.width = 200 | |
$msoffice19.height = 30 | |
$msoffice19.location = New-Object System.Drawing.Point(30,150) | |
$msoffice19.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10) | |
$msoffice1365 = New-Object system.Windows.Forms.Button | |
$msoffice1365.text = "Microsoft Office 365" | |
$msoffice1365.width = 200 | |
$msoffice1365.height = 30 | |
$msoffice1365.location = New-Object System.Drawing.Point(30,190) | |
$msoffice1365.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10) | |
$Visio1619 = New-Object system.Windows.Forms.Button | |
$Visio1619.text = "Microsoft Visio 2016/2019" | |
$Visio1619.width = 200 | |
$Visio1619.height = 30 | |
$Visio1619.location = New-Object System.Drawing.Point(30,230) | |
$Visio1619.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10) | |
$Project1619 = New-Object system.Windows.Forms.Button | |
$Project1619.text = "Microsoft Project 2016/2019" | |
$Project1619.width = 200 | |
$Project1619.height = 30 | |
$Project1619.location = New-Object System.Drawing.Point(30,270) | |
$Project1619.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10) | |
$Panelmini2 = New-Object system.Windows.Forms.Panel | |
$Panelmini2.width = 220 | |
$Panelmini2.height = 70 | |
$Panelmini2.location = New-Object System.Drawing.Point(20,310) | |
$Panelmini2.BorderStyle = "FixedSingle" | |
$activateall = New-Object system.Windows.Forms.Button | |
$activateall.text = "Activate All Above" | |
$activateall.width = 200 | |
$activateall.height = 30 | |
$activateall.location = New-Object System.Drawing.Point(7.5,5) | |
$activateall.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',10) | |
$Labelmini2 = New-Object system.Windows.Forms.Label | |
$Labelmini2.text = " Try all of the above options at once`n Run individually for multiple activation" | |
$Labelmini2.AutoSize = $true | |
$Labelmini2.width = 150 | |
$Labelmini2.height = 10 | |
$Labelmini2.location = New-Object System.Drawing.Point(10,40) | |
$Labelmini2.Font = New-Object System.Drawing.Font('Microsoft Sans Serif',8) | |
$Formmini.controls.AddRange(@($Panelmini1)) | |
$Panelmini1.controls.AddRange(@($Labelmini1,$msoffice1013,$msoffice16,$msoffice19,$msoffice1365,$Visio1619,$Project1619,$Panelmini2)) | |
$Panelmini2.controls.AddRange(@($activateall,$Labelmini2)) | |
$msoffice1013.Add_Click({ $Formmini.WindowState = 1 | |
Set-Location C:\Windows\system32 | |
if (Test-Path "$Env:ProgramFiles\Microsoft Office\Office15\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles\Microsoft Office\Office15"} | |
if (Test-Path "$Env:ProgramFiles(x86)\Microsoft Office\Office15\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles(x86)\Microsoft Office\Office15"} | |
if (Test-Path "$Env:ProgramFiles\Microsoft Office\Office14\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles\Microsoft Office\Office14"} | |
if (Test-Path "$Env:ProgramFiles(x86)\Microsoft Office\Office14\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles(x86)\Microsoft Office\Office14"} | |
Write-Host @" | |
>> Please wait... | |
"@ | |
Import-Module BitsTransfer | |
$ProgressPreference = "SilentlyContinue" | |
$ProgressPreference = "SilentlyContinue" | |
$ProgressPreference = "SilentlyContinue" | |
Start-BitsTransfer -Source "https://get.msguides.com/office2010/Office_2010_Library.zip" -Destination "$env:TEMP" | |
Start-BitsTransfer -Source "https://get.msguides.com/office2013/Office_2013_Library.zip" -Destination "$env:TEMP" | |
Expand-Archive "$env:TEMP\Office_2010_Library.zip" -DestinationPath "C:\" -Force | |
Expand-Archive "$env:TEMP\Office_2013_Library.zip" -DestinationPath "C:\" -Force | |
del "$env:TEMP\Office_2010_Library.zip" | |
del "$env:TEMP\Office_2013_Library.zip" | |
$files = Get-ChildItem -Path C:\library -name | |
foreach($i in 1..7){ | |
$hiden = cscript //b ospp.vbs /inslic:$files[$i] | |
} | |
Remove-Item C:\library -Recurse -Force | |
Write-Host ">> Activating Office" | |
$ProgressPreference = "Continue" | |
$hiden = "" | |
$hiden = cscript //nologo ospp.vbs /inpkey:VYBBJ-TRJPB-QFQRF-QFT4D-H3GVB | |
$hiden = cscript //nologo ospp.vbs /inpkey:YC7DK-G2NP3-2QQC3-J6H88-GVGXT | |
$hiden = cscript //nologo ospp.vbs /sethst:kms8.msguides.com | |
$hiden = cscript //nologo ospp.vbs /setprt:1688 | |
$hiden = cscript //nologo ospp.vbs /act | |
if($hiden -match "successful"){ | |
Write-Host @" | |
Microsoft Office has been Activated successfully | |
"@ -ForegroundColor green | |
}else{Write-Host @" | |
Office didn't Activate | |
- Select the correct version of office or activate all from windows toolkit | |
- Make sure that office is installed in "C" drive | |
- Run Windows Toolkit with Administrative rights | |
- Make sure that you're connected to the internet | |
- Make sure that Window Script Host(WSH) is enabled | |
- Try again later "Microsoft(KMS) server can be busy" | |
"@ -ForegroundColor red | |
} | |
$Formmini.WindowState = 0 | |
}) | |
$msoffice16.Add_Click({ $Formmini.WindowState = 1 | |
Set-Location C:\Windows\system32 | |
if (Test-Path "$Env:ProgramFiles\Microsoft Office\Office16\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles\Microsoft Office\Office16"} | |
if (Test-Path "$Env:ProgramFiles(x86)\Microsoft Office\Office16\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles(x86)\Microsoft Office\Office16"} | |
Write-Host @" | |
>> Please wait... | |
"@ | |
$hiden = cmd.exe /c "(for /f %x in ('dir /b ..\root\Licenses16\proplusvl_kms*.xrm-ms') do cscript //b ospp.vbs /inslic:'..\root\Licenses16\%x') 2>nul" | |
$hiden = cmd.exe /c "(for /f %x in ('dir /b ..\root\Licenses16\proplusvl_mak*.xrm-ms') do cscript //b ospp.vbs /inslic:'..\root\Licenses16\%x') 2>nul" | |
Write-Host ">> Activating Office" | |
$hiden = "" | |
$hiden = cscript //nologo ospp.vbs /setprt:1688 | |
$hiden = cscript //nologo ospp.vbs /unpkey:WFG99 | |
$hiden = cscript //nologo ospp.vbs /unpkey:DRTFM | |
$hiden = cscript //nologo ospp.vbs /unpkey:BTDRB | |
$hiden = cscript //nologo ospp.vbs /unpkey:CPQVG | |
$hiden = cscript //nologo ospp.vbs /inpkey:XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99 | |
$hiden = cscript //nologo ospp.vbs /sethst:kms8.MSGuides.com | |
$hiden = cscript //nologo ospp.vbs /act | |
if($hiden -match "successful"){ | |
Write-Host @" | |
Microsoft Office has been Activated successfully | |
"@ -ForegroundColor green | |
}else{Write-Host @" | |
Office didn't Activate | |
- Select the correct version of office or activate all from windows toolkit | |
- Make sure that office is installed in "C" drive | |
- Run Windows Toolkit with Administrative rights | |
- Make sure that you're connected to the internet | |
- Make sure that Window Script Host(WSH) is enabled | |
- Try again later "Microsoft(KMS) server can be busy" | |
"@ -ForegroundColor red | |
} | |
$Formmini.WindowState = 0 | |
}) | |
$msoffice19.Add_Click({ $Formmini.WindowState = 1 | |
Set-Location C:\Windows\system32 | |
if (Test-Path "$Env:ProgramFiles\Microsoft Office\Office16\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles\Microsoft Office\Office16"} | |
if (Test-Path "$Env:ProgramFiles(x86)\Microsoft Office\Office16\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles(x86)\Microsoft Office\Office16"} | |
Write-Host @" | |
>> Please wait... | |
"@ | |
cmd.exe /c "(for /f %x in ('dir /b ..\root\Licenses16\ProPlus2019VL*.xrm-ms') do cscript //b ospp.vbs /inslic:'..\root\Licenses16\%x') 2>nul" | |
Write-Host ">> Activating Office" | |
$hiden = "" | |
$hiden = cscript //nologo slmgr.vbs /ckms | |
$hiden = cscript //nologo ospp.vbs /setprt:1688 | |
$hiden = cscript //nologo ospp.vbs /unpkey:6MWKP | |
$hiden = cscript //nologo ospp.vbs /inpkey:NMMKJ-6RK4F-KMJVX-8D9MJ-6MWKP | |
$hiden = cscript //nologo ospp.vbs /sethst:kms8.MSGuides.com | |
$hiden = cscript //nologo ospp.vbs /act | |
if($hiden -match "successful"){ | |
Write-Host @" | |
Microsoft Office has been Activated successfully | |
"@ -ForegroundColor green | |
}else{Write-Host @" | |
Office didn't Activate | |
- Select the correct version of office or activate all from windows toolkit | |
- Make sure that office is installed in "C" drive | |
- Run Windows Toolkit with Administrative rights | |
- Make sure that you're connected to the internet | |
- Make sure that Window Script Host(WSH) is enabled | |
- Try again later "Microsoft(KMS) server can be busy" | |
"@ -ForegroundColor red | |
} | |
$Formmini.WindowState = 0 | |
}) | |
$msoffice1365.Add_Click({ $Formmini.WindowState = 1 | |
Set-Location C:\Windows\system32 | |
if (Test-Path "$Env:ProgramFiles\Microsoft Office\Office16\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles\Microsoft Office\Office16"} | |
if (Test-Path "$Env:ProgramFiles(x86)\Microsoft Office\Office16\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles(x86)\Microsoft Office\Office16"} | |
Write-Host @" | |
>> Please wait... | |
"@ | |
cmd.exe /c "(for /f %x in ('dir /b ..\root\Licenses16\proplusvl_kms*.xrm-ms') do cscript //b ospp.vbs /inslic:'..\root\Licenses16\%x') 2>nul" | |
cmd.exe /c "(for /f %x in ('dir /b ..\root\Licenses16\proplusvl_mak*.xrm-ms') do cscript //b ospp.vbs /inslic:'..\root\Licenses16\%x') 2>nul" | |
Write-Host ">> Activating Office" | |
$hiden = "" | |
$hiden = cscript //nologo slmgr.vbs /ckms | |
$hiden = cscript //nologo ospp.vbs /setprt:1688 | |
$hiden = cscript //nologo ospp.vbs /unpkey:WFG99 | |
$hiden = cscript //nologo ospp.vbs /unpkey:DRTFM | |
$hiden = cscript //nologo ospp.vbs /unpkey:BTDRB | |
$hiden = cscript //nologo ospp.vbs /inpkey:XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99 | |
$hiden = cscript //nologo ospp.vbs /sethst:kms8.MSGuides.com | |
$hiden = cscript //nologo ospp.vbs /act | |
if($hiden -match "successful"){ | |
Write-Host @" | |
Microsoft Office has been Activated successfully | |
"@ -ForegroundColor green | |
}else{Write-Host @" | |
Office didn't Activate | |
- Select the correct version of office or activate all from windows toolkit | |
- Make sure that office is installed in "C" drive | |
- Run Windows Toolkit with Administrative rights | |
- Make sure that you're connected to the internet | |
- Make sure that Window Script Host(WSH) is enabled | |
- Try again later "Microsoft(KMS) server can be busy" | |
"@ -ForegroundColor red | |
} | |
$Formmini.WindowState = 0 | |
}) | |
$Visio1619.Add_Click({ $Formmini.WindowState = 1 | |
Set-Location C:\Windows\system32 | |
if (Test-Path "$Env:ProgramFiles\Microsoft Office\Office16\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles\Microsoft Office\Office16"} | |
if (Test-Path "$Env:ProgramFiles(x86)\Microsoft Office\Office16\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles(x86)\Microsoft Office\Office16"} | |
Write-Host @" | |
>> Please wait... | |
"@ | |
$hiden = "" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\ProjectProVL_KMS_Client-ppd.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\ProjectProVL_KMS_Client-ul-oob.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\ProjectProVL_KMS_Client-ul.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\client-issuance-bridge-office.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\client-issuance-root.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\client-issuance-root-bridge-test.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\client-issuance-stil.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\client-issuance-ul.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\client-issuance-ul-oob.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\pkeyconfig-office.xrm-ms" | |
Write-Host ">> Activating MS Visio" | |
$hiden = cscript //nologo slmgr.vbs /ckms | |
$hiden = cscript //nologo ospp.vbs /setprt:1688 | |
$hiden = cscript //nologo ospp.vbs /unpkey:KQBVC | |
$hiden = cscript //nologo ospp.vbs /unpkey:G83KT | |
$hiden = cscript //nologo ospp.vbs /inpkey:YG9NW-3K39V-2T3HJ-93F3Q-G83KT | |
$hiden = cscript //nologo ospp.vbs /sethst:kms8.MSGuides.com | |
$hiden = cscript //nologo ospp.vbs /act | |
if($hiden -match "successful"){ | |
Write-Host @" | |
Microsoft Visio has been Activated successfully | |
"@ -ForegroundColor green | |
}else{ | |
Write-Host @" | |
>> Fail...! trying different Server... | |
"@ | |
Set-Location C:\Windows\system32 | |
if (Test-Path "$Env:ProgramFiles\Microsoft Office\Office16\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles\Microsoft Office\Office16"} | |
if (Test-Path "$Env:ProgramFiles(x86)\Microsoft Office\Office16\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles(x86)\Microsoft Office\Office16"} | |
cmd.exe /c "(for /f %x in ('dir /b ..\root\Licenses16\client-issuance*.xrm-ms') do cscript //b ospp.vbs /inslic:'..\root\Licenses16\%x') 2>nul" | |
cmd.exe /c "(for /f %x in ('dir /b ..\root\Licenses16\projectprovl_kms*.xrm-ms') do cscript //b ospp.vbs /inslic:'..\root\Licenses16\%x') 2>nul" | |
cmd.exe /c "(for /f %x in ('dir /b ..\root\Licenses16\projectpro2019vl_kms*.xrm-ms') do cscript //b ospp.vbs /inslic:'..\root\Licenses16\%x') 2>nul" | |
Write-Host ">> Activating MS Visio" | |
$hiden = "" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\pkeyconfig-office.xrm-ms" | |
$hiden = cscript //nologo slmgr.vbs /ckms | |
$hiden = cscript //nologo ospp.vbs /setprt:1688 | |
$hiden = cscript //nologo ospp.vbs /unpkey:PKD2B | |
$hiden = cscript //nologo ospp.vbs /inpkey:B4NPR-3FKK7-T2MBV-FRQ4W-PKD2B | |
$hiden = cscript //nologo ospp.vbs /sethst:kms8.MSGuides.com | |
$hiden = cscript //nologo ospp.vbs /act | |
if($hiden -match "successful"){ | |
Write-Host @" | |
Microsoft Visio has been Activated successfully | |
"@ -ForegroundColor green | |
}else{Write-Host @" | |
Microsoft Visio didn't Activate | |
- Select the correct version of office or activate all from windows toolkit | |
- Make sure that office is installed in "C" drive | |
- Run Windows Toolkit with Administrative rights | |
- Make sure that you're connected to the internet | |
- Make sure that Window Script Host(WSH) is enabled | |
- Try again later "Microsoft(KMS) server can be busy" | |
"@ -ForegroundColor red | |
} | |
} | |
$Formmini.WindowState = 0 | |
}) | |
$Project1619.Add_Click({ $Formmini.WindowState = 1 | |
Set-Location C:\Windows\system32 | |
if (Test-Path "$Env:ProgramFiles\Microsoft Office\Office16\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles\Microsoft Office\Office16"} | |
if (Test-Path "$Env:ProgramFiles(x86)\Microsoft Office\Office16\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles(x86)\Microsoft Office\Office16"} | |
Write-Host @" | |
>> Please wait... | |
"@ | |
$hiden = "" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\ProjectProVL_KMS_Client-ppd.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\ProjectProVL_KMS_Client-ul-oob.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\ProjectProVL_KMS_Client-ul.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\client-issuance-bridge-office.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\client-issuance-root.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\client-issuance-root-bridge-test.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\client-issuance-stil.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\client-issuance-ul.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\client-issuance-ul-oob.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\pkeyconfig-office.xrm-ms" | |
Write-Host ">> Activating MS Project" | |
$hiden = "" | |
$hiden = cscript //nologo slmgr.vbs /ckms | |
$hiden = cscript //nologo ospp.vbs /setprt:1688 | |
$hiden = cscript //nologo ospp.vbs /unpkey:KQBVC | |
$hiden = cscript //nologo ospp.vbs /unpkey:G83KT | |
$hiden = cscript //nologo ospp.vbs /inpkey:YG9NW-3K39V-2T3HJ-93F3Q-G83KT | |
$hiden = cscript //nologo ospp.vbs /sethst:kms8.MSGuides.com | |
$hiden = cscript //nologo ospp.vbs /act | |
if($hiden -match "successful"){ | |
Write-Host @" | |
Microsoft Project has been Activated successfully | |
"@ -ForegroundColor green | |
}else{ | |
Write-Host @" | |
>> Fail...! trying different Server... | |
"@ | |
Set-Location C:\Windows\system32 | |
if (Test-Path "$Env:ProgramFiles\Microsoft Office\Office16\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles\Microsoft Office\Office16"} | |
if (Test-Path "$Env:ProgramFiles(x86)\Microsoft Office\Office16\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles(x86)\Microsoft Office\Office16"} | |
cmd.exe /c "(for /f %x in ('dir /b ..\root\Licenses16\client-issuance*.xrm-ms') do cscript //b ospp.vbs /inslic:'..\root\Licenses16\%x') 2>nul" | |
cmd.exe /c "(for /f %x in ('dir /b ..\root\Licenses16\projectprovl_kms*.xrm-ms') do cscript //b ospp.vbs /inslic:'..\root\Licenses16\%x') 2>nul" | |
cmd.exe /c "(for /f %x in ('dir /b ..\root\Licenses16\projectpro2019vl_kms*.xrm-ms') do cscript //b ospp.vbs /inslic:'..\root\Licenses16\%x') 2>nul" | |
Write-Host ">> Activating MS Project" | |
$hiden = "" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\pkeyconfig-office.xrm-ms" | |
$hiden = cscript //nologo slmgr.vbs /ckms | |
$hiden = cscript //nologo ospp.vbs /setprt:1688 | |
$hiden = cscript //nologo ospp.vbs /unpkey:PKD2B | |
$hiden = cscript //nologo ospp.vbs /inpkey:B4NPR-3FKK7-T2MBV-FRQ4W-PKD2B | |
$hiden = cscript //nologo ospp.vbs /sethst:kms8.MSGuides.com | |
$hiden = cscript //nologo ospp.vbs /act | |
if($hiden -match "successful"){ | |
Write-Host @" | |
Microsoft Project has been Activated successfully | |
"@ -ForegroundColor green | |
}else{Write-Host @" | |
Microsoft Project didn't Activate | |
- Select the correct version of office or activate all from windows toolkit | |
- Make sure that office is installed in "C" drive | |
- Run Windows Toolkit with Administrative rights | |
- Make sure that you're connected to the internet | |
- Make sure that Window Script Host(WSH) is enabled | |
- Try again later "Microsoft(KMS) server can be busy" | |
"@ -ForegroundColor red | |
} | |
} | |
$Formmini.WindowState = 0 | |
}) | |
$activateall.Add_Click({ $Formmini.WindowState = 1 | |
For (){ | |
Set-Location C:\Windows\system32 | |
if (Test-Path "$Env:ProgramFiles\Microsoft Office\Office16\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles\Microsoft Office\Office16"} | |
if (Test-Path "$Env:ProgramFiles(x86)\Microsoft Office\Office16\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles(x86)\Microsoft Office\Office16"} | |
Write-Host @" | |
>> Please wait... | |
"@ | |
cmd.exe /c "(for /f %x in ('dir /b ..\root\Licenses16\proplusvl_kms*.xrm-ms') do cscript //b ospp.vbs /inslic:'..\root\Licenses16\%x') 2>nul" | |
cmd.exe /c "(for /f %x in ('dir /b ..\root\Licenses16\proplusvl_mak*.xrm-ms') do cscript //b ospp.vbs /inslic:'..\root\Licenses16\%x') 2>nul" | |
Write-Host ">> Activating Office" | |
$hiden = "" | |
$hiden = cscript //nologo ospp.vbs /setprt:1688 | |
$hiden = cscript //nologo ospp.vbs /unpkey:WFG99 | |
$hiden = cscript //nologo ospp.vbs /unpkey:DRTFM | |
$hiden = cscript //nologo ospp.vbs /unpkey:BTDRB | |
$hiden = cscript //nologo ospp.vbs /unpkey:CPQVG | |
$hiden = cscript //nologo ospp.vbs /inpkey:XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99 | |
$hiden = cscript //nologo ospp.vbs /sethst:kms8.MSGuides.com | |
$hiden = cscript //nologo ospp.vbs /act | |
if($hiden -match "successful"){ | |
Write-Host @" | |
Microsoft Office has been Activated successfully | |
"@ -ForegroundColor green ; $Formmini.WindowState = 0 ; Break | |
} | |
Write-Host ">> Fail...! trying Other Options" | |
Set-Location C:\Windows\system32 | |
if (Test-Path "$Env:ProgramFiles\Microsoft Office\Office16\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles\Microsoft Office\Office16"} | |
if (Test-Path "$Env:ProgramFiles(x86)\Microsoft Office\Office16\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles(x86)\Microsoft Office\Office16"} | |
Write-Host @" | |
>> Please wait... | |
"@ | |
cmd.exe /c "(for /f %x in ('dir /b ..\root\Licenses16\ProPlus2019VL*.xrm-ms') do cscript //b ospp.vbs /inslic:'..\root\Licenses16\%x') 2>nul" | |
Write-Host ">> Activating Office" | |
$hiden = "" | |
$hiden = cscript //nologo slmgr.vbs /ckms | |
$hiden = cscript //nologo ospp.vbs /setprt:1688 | |
$hiden = cscript //nologo ospp.vbs /unpkey:6MWKP | |
$hiden = cscript //nologo ospp.vbs /inpkey:NMMKJ-6RK4F-KMJVX-8D9MJ-6MWKP | |
$hiden = cscript //nologo ospp.vbs /sethst:kms8.MSGuides.com | |
$hiden = cscript //nologo ospp.vbs /act | |
if($hiden -match "successful"){ | |
Write-Host @" | |
Microsoft Office has been Activated successfully | |
"@ -ForegroundColor green ; $Formmini.WindowState = 0 ; Break | |
} | |
Write-Host ">> Fail...! trying Other Options" | |
Set-Location C:\Windows\system32 | |
if (Test-Path "$Env:ProgramFiles\Microsoft Office\Office16\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles\Microsoft Office\Office16"} | |
if (Test-Path "$Env:ProgramFiles(x86)\Microsoft Office\Office16\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles(x86)\Microsoft Office\Office16"} | |
Write-Host @" | |
>> Please wait... | |
"@ | |
cmd.exe /c "(for /f %x in ('dir /b ..\root\Licenses16\proplusvl_kms*.xrm-ms') do cscript //b ospp.vbs /inslic:'..\root\Licenses16\%x') 2>nul" | |
cmd.exe /c "(for /f %x in ('dir /b ..\root\Licenses16\proplusvl_mak*.xrm-ms') do cscript //b ospp.vbs /inslic:'..\root\Licenses16\%x') 2>nul" | |
Write-Host ">> Activating Office" | |
$hiden = "" | |
$hiden = cscript //nologo slmgr.vbs /ckms | |
$hiden = cscript //nologo ospp.vbs /setprt:1688 | |
$hiden = cscript //nologo ospp.vbs /unpkey:WFG99 | |
$hiden = cscript //nologo ospp.vbs /unpkey:DRTFM | |
$hiden = cscript //nologo ospp.vbs /unpkey:BTDRB | |
$hiden = cscript //nologo ospp.vbs /inpkey:XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99 | |
$hiden = cscript //nologo ospp.vbs /sethst:kms8.MSGuides.com | |
$hiden = cscript //nologo ospp.vbs /act | |
if($hiden -match "successful"){ | |
Write-Host @" | |
Microsoft Office has been Activated successfully | |
"@ -ForegroundColor green ; $Formmini.WindowState = 0 ; Break | |
} | |
Write-Host ">> Fail...! trying Other Options" | |
Set-Location C:\Windows\system32 | |
if (Test-Path "$Env:ProgramFiles\Microsoft Office\Office16\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles\Microsoft Office\Office16"} | |
if (Test-Path "$Env:ProgramFiles(x86)\Microsoft Office\Office16\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles(x86)\Microsoft Office\Office16"} | |
Write-Host @" | |
>> Please wait... | |
"@ | |
$hiden = "" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\ProjectProVL_KMS_Client-ppd.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\ProjectProVL_KMS_Client-ul-oob.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\ProjectProVL_KMS_Client-ul.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\client-issuance-bridge-office.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\client-issuance-root.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\client-issuance-root-bridge-test.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\client-issuance-stil.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\client-issuance-ul.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\client-issuance-ul-oob.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\pkeyconfig-office.xrm-ms" | |
Write-Host ">> Activating MS Visio" | |
$hiden = cscript //nologo slmgr.vbs /ckms | |
$hiden = cscript //nologo ospp.vbs /setprt:1688 | |
$hiden = cscript //nologo ospp.vbs /unpkey:KQBVC | |
$hiden = cscript //nologo ospp.vbs /unpkey:G83KT | |
$hiden = cscript //nologo ospp.vbs /inpkey:YG9NW-3K39V-2T3HJ-93F3Q-G83KT | |
$hiden = cscript //nologo ospp.vbs /sethst:kms8.MSGuides.com | |
$hiden = cscript //nologo ospp.vbs /act | |
if($hiden -match "successful"){ | |
Write-Host @" | |
Microsoft Visio has been Activated successfully | |
"@ -ForegroundColor green ; $Formmini.WindowState = 0 ; Break | |
}else{ | |
Write-Host @" | |
>> Fail...! trying different Server... | |
"@ | |
Set-Location C:\Windows\system32 | |
if (Test-Path "$Env:ProgramFiles\Microsoft Office\Office16\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles\Microsoft Office\Office16"} | |
if (Test-Path "$Env:ProgramFiles(x86)\Microsoft Office\Office16\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles(x86)\Microsoft Office\Office16"} | |
cmd.exe /c "(for /f %x in ('dir /b ..\root\Licenses16\client-issuance*.xrm-ms') do cscript //b ospp.vbs /inslic:'..\root\Licenses16\%x') 2>nul" | |
cmd.exe /c "(for /f %x in ('dir /b ..\root\Licenses16\projectprovl_kms*.xrm-ms') do cscript //b ospp.vbs /inslic:'..\root\Licenses16\%x') 2>nul" | |
cmd.exe /c "(for /f %x in ('dir /b ..\root\Licenses16\projectpro2019vl_kms*.xrm-ms') do cscript //b ospp.vbs /inslic:'..\root\Licenses16\%x') 2>nul" | |
Write-Host ">> Activating MS Visio" | |
$hiden = "" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\pkeyconfig-office.xrm-ms" | |
$hiden = cscript //nologo slmgr.vbs /ckms | |
$hiden = cscript //nologo ospp.vbs /setprt:1688 | |
$hiden = cscript //nologo ospp.vbs /unpkey:PKD2B | |
$hiden = cscript //nologo ospp.vbs /inpkey:B4NPR-3FKK7-T2MBV-FRQ4W-PKD2B | |
$hiden = cscript //nologo ospp.vbs /sethst:kms8.MSGuides.com | |
$hiden = cscript //nologo ospp.vbs /act | |
if($hiden -match "successful"){ | |
Write-Host @" | |
Microsoft Visio has been Activated successfully | |
"@ -ForegroundColor green ; $Formmini.WindowState = 0 ; Break | |
} | |
} | |
Write-Host ">> Fail...! trying Other Options" | |
Set-Location C:\Windows\system32 | |
if (Test-Path "$Env:ProgramFiles\Microsoft Office\Office16\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles\Microsoft Office\Office16"} | |
if (Test-Path "$Env:ProgramFiles(x86)\Microsoft Office\Office16\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles(x86)\Microsoft Office\Office16"} | |
Write-Host @" | |
>> Please wait... | |
"@ | |
$hiden = "" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\ProjectProVL_KMS_Client-ppd.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\ProjectProVL_KMS_Client-ul-oob.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\ProjectProVL_KMS_Client-ul.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\client-issuance-bridge-office.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\client-issuance-root.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\client-issuance-root-bridge-test.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\client-issuance-stil.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\client-issuance-ul.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\client-issuance-ul-oob.xrm-ms" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\pkeyconfig-office.xrm-ms" | |
Write-Host ">> Activating MS Project" | |
$hiden = "" | |
$hiden = cscript //nologo slmgr.vbs /ckms | |
$hiden = cscript //nologo ospp.vbs /setprt:1688 | |
$hiden = cscript //nologo ospp.vbs /unpkey:KQBVC | |
$hiden = cscript //nologo ospp.vbs /unpkey:G83KT | |
$hiden = cscript //nologo ospp.vbs /inpkey:YG9NW-3K39V-2T3HJ-93F3Q-G83KT | |
$hiden = cscript //nologo ospp.vbs /sethst:kms8.MSGuides.com | |
$hiden = cscript //nologo ospp.vbs /act | |
if($hiden -match "successful"){ | |
Write-Host @" | |
Microsoft Project has been Activated successfully | |
"@ -ForegroundColor green ; $Formmini.WindowState = 0 ; Break | |
}else{ | |
Write-Host @" | |
>> Fail...! trying different Server... | |
"@ | |
Set-Location C:\Windows\system32 | |
if (Test-Path "$Env:ProgramFiles\Microsoft Office\Office16\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles\Microsoft Office\Office16"} | |
if (Test-Path "$Env:ProgramFiles(x86)\Microsoft Office\Office16\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles(x86)\Microsoft Office\Office16"} | |
cmd.exe /c "(for /f %x in ('dir /b ..\root\Licenses16\client-issuance*.xrm-ms') do cscript //b ospp.vbs /inslic:'..\root\Licenses16\%x') 2>nul" | |
cmd.exe /c "(for /f %x in ('dir /b ..\root\Licenses16\projectprovl_kms*.xrm-ms') do cscript //b ospp.vbs /inslic:'..\root\Licenses16\%x') 2>nul" | |
cmd.exe /c "(for /f %x in ('dir /b ..\root\Licenses16\projectpro2019vl_kms*.xrm-ms') do cscript //b ospp.vbs /inslic:'..\root\Licenses16\%x') 2>nul" | |
Write-Host ">> Activating MS Project" | |
$hiden = "" | |
$hiden = cscript //b ospp.vbs /inslic:"..\root\Licenses16\pkeyconfig-office.xrm-ms" | |
$hiden = cscript //nologo slmgr.vbs /ckms | |
$hiden = cscript //nologo ospp.vbs /setprt:1688 | |
$hiden = cscript //nologo ospp.vbs /unpkey:PKD2B | |
$hiden = cscript //nologo ospp.vbs /inpkey:B4NPR-3FKK7-T2MBV-FRQ4W-PKD2B | |
$hiden = cscript //nologo ospp.vbs /sethst:kms8.MSGuides.com | |
$hiden = cscript //nologo ospp.vbs /act | |
if($hiden -match "successful"){ | |
Write-Host @" | |
Microsoft Project has been Activated successfully | |
"@ -ForegroundColor green ; $Formmini.WindowState = 0 ; Break | |
} | |
} | |
Write-Host ">> Fail...! trying Other Options" | |
Set-Location C:\Windows\system32 | |
if (Test-Path "$Env:ProgramFiles\Microsoft Office\Office15\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles\Microsoft Office\Office15"} | |
if (Test-Path "$Env:ProgramFiles(x86)\Microsoft Office\Office15\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles(x86)\Microsoft Office\Office15"} | |
if (Test-Path "$Env:ProgramFiles\Microsoft Office\Office14\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles\Microsoft Office\Office14"} | |
if (Test-Path "$Env:ProgramFiles(x86)\Microsoft Office\Office14\ospp.vbs" -PathType leaf){Set-Location "$Env:ProgramFiles(x86)\Microsoft Office\Office14"} | |
Write-Host @" | |
>> Please wait... | |
"@ | |
Import-Module BitsTransfer | |
$ProgressPreference = "SilentlyContinue" | |
$ProgressPreference = "SilentlyContinue" | |
$ProgressPreference = "SilentlyContinue" | |
Start-BitsTransfer -Source "https://get.msguides.com/office2010/Office_2010_Library.zip" -Destination "$env:TEMP" | |
Start-BitsTransfer -Source "https://get.msguides.com/office2013/Office_2013_Library.zip" -Destination "$env:TEMP" | |
Expand-Archive "$env:TEMP\Office_2010_Library.zip" -DestinationPath "C:\" -Force | |
Expand-Archive "$env:TEMP\Office_2013_Library.zip" -DestinationPath "C:\" -Force | |
del "$env:TEMP\Office_2010_Library.zip" | |
del "$env:TEMP\Office_2013_Library.zip" | |
$files = Get-ChildItem -Path C:\library -name | |
foreach($i in 1..7){ | |
$hiden = cscript //b ospp.vbs /inslic:$files[$i] | |
} | |
Remove-Item C:\library -Recurse -Force | |
$ProgressPreference = "Continue" | |
Write-Host ">> Activating Office" | |
$hiden = "" | |
$hiden = cscript //nologo ospp.vbs /inpkey:VYBBJ-TRJPB-QFQRF-QFT4D-H3GVB | |
$hiden = cscript //nologo ospp.vbs /inpkey:YC7DK-G2NP3-2QQC3-J6H88-GVGXT | |
$hiden = cscript //nologo ospp.vbs /sethst:kms8.msguides.com | |
$hiden = cscript //nologo ospp.vbs /setprt:1688 | |
$hiden = cscript //nologo ospp.vbs /act | |
if($hiden -match "successful"){ | |
Write-Host @" | |
Microsoft Office has been Activated successfully | |
"@ -ForegroundColor green ; $Formmini.WindowState = 0 ; Break | |
} | |
Write-Host @" | |
Microsoft Office/visio/Project didn't Activate | |
- Make sure that office is installed in "C" drive | |
- Run Windows Toolkit with Administrative rights | |
- Make sure that you're connected to the internet | |
- Make sure that Window Script Host(WSH) is enabled | |
- Try again later "Microsoft(KMS) server can be busy" | |
"@ -ForegroundColor red | |
$Formmini.WindowState = 0 | |
Break | |
} | |
}) | |
[void]$Formmini.ShowDialog() | |
$Form.WindowState = 0 | |
}) | |
$activatewin.Add_Click({ | |
$Sysdir = [System.Environment]::SystemDirectory | |
$hiden = Set-Location -Path $Sysdir -PassThru | |
Write-Host @" | |
>> Please wait... | |
"@ | |
$initreturn = cscript //nologo slmgr.vbs /ckms | |
$initreturn = cscript //nologo slmgr.vbs /upk | |
$initreturn = cscript //nologo slmgr.vbs /cpky | |
$initreturn = "" | |
if ($initreturn -notmatch "successfully"){$initreturn = cscript //nologo slmgr.vbs /ipk NPPR9-FWDCX-D2C8J-H872K-2YT43} | |
if ($initreturn -notmatch "successfully"){$initreturn = cscript //nologo slmgr.vbs /ipk DPH2V-TTNVB-4X9Q3-TJR4H-KHJW4} | |
if ($initreturn -notmatch "successfully"){$initreturn = cscript //nologo slmgr.vbs /ipk WNMTR-4C88C-JK8YV-HQ7T2-76DF9} | |
if ($initreturn -notmatch "successfully"){$initreturn = cscript //nologo slmgr.vbs /ipk 2F77B-TNFGY-69QQF-B8YKP-D69TJ} | |
if ($initreturn -notmatch "successfully"){$initreturn = cscript //nologo slmgr.vbs /ipk DCPHK-NFMTC-H88MJ-PFHPY-QJ4BJ} | |
if ($initreturn -notmatch "successfully"){$initreturn = cscript //nologo slmgr.vbs /ipk QFFDN-GRT3P-VKWWX-X7T3R-8B639} | |
if ($initreturn -notmatch "successfully"){$initreturn = cscript //nologo slmgr.vbs /ipk TX9XD-98N7V-6WMQ6-BX7FG-H8Q99} | |
if ($initreturn -notmatch "successfully"){$initreturn = cscript //nologo slmgr.vbs /ipk 3KHY7-WNT83-DGQKR-F7HPR-844BM} | |
if ($initreturn -notmatch "successfully"){$initreturn = cscript //nologo slmgr.vbs /ipk 7HNRX-D7KGG-3K4RQ-4WPJ4-YTDFH} | |
if ($initreturn -notmatch "successfully"){$initreturn = cscript //nologo slmgr.vbs /ipk PVMJN-6DFY6-9CCP6-7BKTT-D3WVR} | |
if ($initreturn -notmatch "successfully"){$initreturn = cscript //nologo slmgr.vbs /ipk NW6C2-QMPVW-D7KKK-3GKT6-VCFB2} | |
if ($initreturn -notmatch "successfully"){$initreturn = cscript //nologo slmgr.vbs /ipk 2WH4N-8QGBV-H22JP-CT43Q-MDWWJ} | |
if ($initreturn -notmatch "successfully"){$initreturn = cscript //nologo slmgr.vbs /ipk W269N-WFGWX-YVC9B-4J6C9-T83GX} | |
if ($initreturn -notmatch "successfully"){$initreturn = cscript //nologo slmgr.vbs /ipk MH37W-N47XK-V7XM9-C7227-GCQG9} | |
if ($initreturn -notmatch "successfully"){$initreturn = cscript //nologo slmgr.vbs /ipk MHF9N-XY6XB-WVXMC-BTDCT-MKKG7} | |
if ($initreturn -notmatch "successfully"){$initreturn = cscript //nologo slmgr.vbs /ipk TT4HM-HN7YT-62K67-RGRQJ-JFFXW} | |
if ($initreturn -notmatch "successfully"){$initreturn = cscript //nologo slmgr.vbs /ipk 32JNW-9KQ84-P47T8-D8GGY-CWCK7} | |
if ($initreturn -notmatch "successfully"){$initreturn = cscript //nologo slmgr.vbs /ipk JMNMF-RHW7P-DMY6X-RF3DR-X2BQT} | |
if ($initreturn -notmatch "successfully"){$initreturn = cscript //nologo slmgr.vbs /ipk GCRJD-8NW9H-F2CDX-CCM8D-9D6T9} | |
if ($initreturn -notmatch "successfully"){$initreturn = cscript //nologo slmgr.vbs /ipk HMCNV-VVBFX-7HMBH-CTY9B-B4FXY} | |
if ($initreturn -notmatch "successfully"){$initreturn = cscript //nologo slmgr.vbs /ipk NG4HW-VH26C-733KW-K6F98-J8CK4} | |
if ($initreturn -notmatch "successfully"){$initreturn = cscript //nologo slmgr.vbs /ipk XCVCF-2NXM9-723PB-MHCB7-2RYQQ} | |
if ($initreturn -notmatch "successfully"){$initreturn = cscript //nologo slmgr.vbs /ipk BN3D2-R7TKB-3YPBD-8DRP2-27GG4} | |
if ($initreturn -notmatch "successfully"){$initreturn = cscript //nologo slmgr.vbs /ipk 2WN2H-YGCQR-KFX6K-CD6TF-84YXQ} | |
if ($initreturn -notmatch "successfully"){$initreturn = cscript //nologo slmgr.vbs /ipk GNBB8-YVD74-QJHX6-27H4K-8QHDG} | |
if ($initreturn -notmatch "successfully"){$initreturn = cscript //nologo slmgr.vbs /ipk M9Q9P-WNJJT-6PXPY-DWX8H-6XWKK} | |
if ($initreturn -notmatch "successfully"){$initreturn = cscript //nologo slmgr.vbs /ipk 7B9N3-D94CG-YTVHR-QBPX3-RJP64} | |
if ($initreturn -notmatch "successfully"){$initreturn = cscript //nologo slmgr.vbs /ipk BB6NG-PQ82V-VRDPW-8XVD2-V8P66} | |
if ($initreturn -notmatch "successfully"){$initreturn = cscript //nologo slmgr.vbs /ipk 789NJ-TQK6T-6XTH8-J39CJ-J8D3P} | |
Write-Host @" | |
>> Activating Windows | |
"@ | |
For () { | |
$initreturn = cscript //nologo slmgr.vbs /skms kms8.MSGuides.com | |
if ($initreturn -match "successfully"){$initreturn = cscript //nologo slmgr.vbs /ato ; if($initreturn -match "successfully"){write-host $initreturn[0] -ForegroundColor green ; write-host $initreturn[1] -ForegroundColor green ; Break}} | |
$initreturn = cscript //nologo slmgr.vbs /skms kms9.MSGuides.com | |
if ($initreturn -match "successfully"){$initreturn = cscript //nologo slmgr.vbs /ato ; if($initreturn -match "successfully"){write-host $initreturn[0] -ForegroundColor green ; write-host $initreturn[1] -ForegroundColor green ; Break}} | |
$initreturn = cscript //nologo slmgr.vbs /skms kms7.MSGuides.com | |
if ($initreturn -match "successfully"){$initreturn = cscript //nologo slmgr.vbs /ato ; if($initreturn -match "successfully"){write-host $initreturn[0] -ForegroundColor green ; write-host $initreturn[1] -ForegroundColor green ; Break}} | |
Write-Host @" | |
Microsoft Key Management Service(KMS) didn't able to activate your window. | |
- Run Windows Toolkit with Administrative rights | |
- Make sure that you're connected to the internet | |
- Make sure that Window Script Host(WSH) is enabled | |
- Try again later "Microsoft(KMS) server can be busy" | |
"@ -ForegroundColor red | |
Break | |
} | |
}) | |
$Createrestorepoint.Add_Click({ | |
Enable-ComputerRestore -Drive "C:\" | |
REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" /V "SystemRestorePointCreationFrequency" /T REG_DWORD /D 0 /F | |
Checkpoint-Computer -Description "Window Toolkit" -RestorePointType "MODIFY_SETTINGS" | |
}) | |
$Restorebackup.Add_Click({ | |
Start rstrui.exe | |
}) | |
$BalanceMode.Add_Click({ | |
$powermode = Powercfg.exe /L | |
if("$powermode" -notmatch "381b4222-f694-41f0-9685-ff5bb260df2e") | |
{ | |
powercfg -duplicatescheme 381b4222-f694-41f0-9685-ff5bb260df2e | |
} | |
Powercfg /S 381b4222-f694-41f0-9685-ff5bb260df2e | |
Write-Host "Set to Balanced mode" | |
$wshell.Popup("Operation Completed",0," Done",0x0) | |
}) | |
$UltraPowermode.Add_Click({ | |
$powermode1 = Powercfg.exe /L | |
if("$powermode1" -notmatch "e9a42b02-d5df-448d-aa00-03f14749eb61") | |
{ | |
powercfg -duplicatescheme e9a42b02-d5df-448d-aa00-03f14749eb61 | |
} | |
Powercfg /S e9a42b02-d5df-448d-aa00-03f14749eb61 | |
Write-Host "Set to UltraPower Mode" | |
$wshell.Popup("Operation Completed",0," Done",0x0) | |
}) | |
$help.Add_Click({ | |
$Path1 = "$env:temp\HelpFile.txt" | |
$Parseshelpcontent = @" | |
System tweaks/~ | |
Recommended Options: | |
Disable Cortana | |
Uninstall OneDrive | |
Run Essential Tweaks | |
Press Fast Animation | |
Windows Update Settings/~ | |
Windows updates everything automatically in the background without your knowing, which takes alot of your internet data | |
and processing speed which slow down your pc preformance even when u need your PC. Your tasks will set to low priority | |
and Windows updates will be on highest prioirty. | |
So it is Recommended to do "Security updates" only. which will only Updates Security part of the windows | |
Other windows update will be done manually. (which is Recommended) | |
Additional Options/~ | |
"@ | |
Set-Content $Path1 $Parseshelpcontent | |
start $Path1 | |
}) | |
$cortana.Add_Click({ | |
Write-Host "Disabling 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 | |
$wshell.Popup("Operation Completed",0," Done",0x0) | |
}) | |
$securitylow.Add_Click({ | |
Write-Host "Lowering UAC level..." | |
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "ConsentPromptBehaviorAdmin" -Type DWord -Value 0 | |
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "PromptOnSecureDesktop" -Type DWord -Value 0 | |
Write-Host "Disabling Windows Defender..." | |
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender")) { | |
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender" -Force | Out-Null | |
} | |
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender" -Name "DisableAntiSpyware" -Type DWord -Value 1 | |
If ([System.Environment]::OSVersion.Version.Build -eq 14393) { | |
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" -Name "WindowsDefender" -ErrorAction SilentlyContinue | |
} ElseIf ([System.Environment]::OSVersion.Version.Build -ge 15063) { | |
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" -Name "SecurityHealth" -ErrorAction SilentlyContinue | |
} | |
Write-Host "Disabling Windows Defender Cloud..." | |
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet")) { | |
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" -Force | Out-Null | |
} | |
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" -Name "SpynetReporting" -Type DWord -Value 0 | |
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" -Name "SubmitSamplesConsent" -Type DWord -Value 2 | |
Write-Host "Disabling Meltdown (CVE-2017-5754) compatibility flag..." | |
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\QualityCompat" -Name "cadca5fe-87d3-4b96-b7fb-a231484277cc" -ErrorAction SilentlyContinue | |
Write-Host "Disabling Malicious Software Removal Tool offering..." | |
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\MRT")) { | |
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\MRT" | Out-Null | |
} | |
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\MRT" -Name "DontOfferThroughWUAU" -Type DWord -Value 1 | |
$wshell.Popup("Operation Completed",0," Done",0x0) | |
}) | |
$securityhigh.Add_Click({ | |
Write-Host "Raising UAC level..." | |
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "ConsentPromptBehaviorAdmin" -Type DWord -Value 5 | |
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" -Name "PromptOnSecureDesktop" -Type DWord -Value 1 | |
Write-Host "Disabling SMB 1.0 protocol..." | |
Set-SmbServerConfiguration -EnableSMB1Protocol $false -Force | |
Write-Host "Enabling Windows Defender..." | |
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender" -Name "DisableAntiSpyware" -ErrorAction SilentlyContinue | |
If ([System.Environment]::OSVersion.Version.Build -eq 14393) { | |
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" -Name "WindowsDefender" -Type ExpandString -Value "`"%ProgramFiles%\Windows Defender\MSASCuiL.exe`"" | |
} ElseIf ([System.Environment]::OSVersion.Version.Build -ge 15063) { | |
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" -Name "SecurityHealth" -Type ExpandString -Value "`"%ProgramFiles%\Windows Defender\MSASCuiL.exe`"" | |
} | |
Write-Host "Enabling Windows Defender Cloud..." | |
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" -Name "SpynetReporting" -ErrorAction SilentlyContinue | |
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender\Spynet" -Name "SubmitSamplesConsent" -ErrorAction SilentlyContinue | |
Write-Host "Enabling Meltdown (CVE-2017-5754) compatibility flag..." | |
If (!(Test-Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\QualityCompat")) { | |
New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\QualityCompat" | Out-Null | |
} | |
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\QualityCompat" -Name "cadca5fe-87d3-4b96-b7fb-a231484277cc" -Type DWord -Value 0 | |
Write-Host "Enabling Malicious Software Removal Tool offering..." | |
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\MRT" -Name "DontOfferThroughWUAU" -ErrorAction SilentlyContinue | |
$wshell.Popup("Operation Completed",0," Done",0x0) | |
}) | |
$defaultwindowsupdate.Add_Click({ | |
Write-Host "Enabling driver offering through Windows Update..." | |
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Device Metadata" -Name "PreventDeviceMetadataFromNetwork" -ErrorAction SilentlyContinue | |
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DontPromptForWindowsUpdate" -ErrorAction SilentlyContinue | |
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DontSearchWindowsUpdate" -ErrorAction SilentlyContinue | |
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DriverUpdateWizardWuSearchEnabled" -ErrorAction SilentlyContinue | |
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "ExcludeWUDriversInQualityUpdate" -ErrorAction SilentlyContinue | |
Write-Host "Enabling Windows Update automatic restart..." | |
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoRebootWithLoggedOnUsers" -ErrorAction SilentlyContinue | |
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AUPowerManagement" -ErrorAction SilentlyContinue | |
$wshell.Popup("Operation Completed",0," Done",0x0) | |
}) | |
$securitywindowsupdate.Add_Click({ | |
Write-Host "Disabling driver offering through Windows Update..." | |
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Device Metadata")) { | |
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Device Metadata" -Force | Out-Null | |
} | |
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Device Metadata" -Name "PreventDeviceMetadataFromNetwork" -Type DWord -Value 1 | |
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching")) { | |
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Force | Out-Null | |
} | |
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DontPromptForWindowsUpdate" -Type DWord -Value 1 | |
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DontSearchWindowsUpdate" -Type DWord -Value 1 | |
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\DriverSearching" -Name "DriverUpdateWizardWuSearchEnabled" -Type DWord -Value 0 | |
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate")) { | |
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" | Out-Null | |
} | |
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name "ExcludeWUDriversInQualityUpdate" -Type DWord -Value 1 | |
Write-Host "Disabling Windows Update automatic restart..." | |
If (!(Test-Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU")) { | |
New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Force | Out-Null | |
} | |
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "NoAutoRebootWithLoggedOnUsers" -Type DWord -Value 1 | |
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "AUPowerManagement" -Type DWord -Value 0 | |
$wshell.Popup("Operation Completed",0," Done",0x0) | |
}) | |
$actioncenter.Add_Click({ | |
Write-Host "Disabling 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 | |
$wshell.Popup("Operation Completed",0," Done",0x0) | |
}) | |
$visualfx.Add_Click({ | |
Write-Host "Adjusting visual effects for performance..." | |
Set-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name "DragFullWindows" -Type String -Value 0 | |
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 | |
$wshell.Popup("Operation Completed",0," Done",0x0) | |
}) | |
$DisableOneDrive.Add_Click({ | |
Write-Host "Disabling OneDrive..." | |
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 | |
Write-Host "Uninstalling OneDrive..." | |
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 | |
Start-Sleep -s 2 | |
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 | |
$wshell.Popup("Operation Completed",0," Done",0x0) | |
}) | |
$darkmode.Add_Click({ | |
Write-Host "Enabling Dark Mode" | |
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme -Value 0 | |
$wshell.Popup("Operation Completed",0," Done",0x0) | |
}) | |
$lightmode.Add_Click({ | |
Write-Host "Switching Back to Light Mode" | |
Remove-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize -Name AppsUseLightTheme | |
$wshell.Popup("Operation Completed",0," Done",0x0) | |
}) | |
#////////////////////////////Restore button////////////////////////////////////////// | |
$EnableActionCenter.Add_Click({ | |
Write-Host "Enabling 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 - Reverted to Stock Settings" | |
}) | |
$EnableCortana.Add_Click({ | |
Write-Host "Enabling 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 - Reverted to Stock Settings" | |
}) | |
$RestoreWDefenderIcon.Add_Click({ | |
Write-Host "Restoring Windows Defender Icon..." | |
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" -Name "SecurityHealth" -Type ExpandString -Value "%windir%\system32\SecurityHealthSystray.exe" | |
Write-Host "Done - Reverted to Stock Settings" | |
}) | |
$EnableWindowsSearch.Add_Click({ | |
Write-Host "Restoring Windows Search..." | |
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" -Name "BingSearchEnabled" -Type DWord -Value "1" | |
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" -Name "CortanaConsent" -ErrorAction SilentlyContinue | |
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" -Name "DisableWebSearch" -ErrorAction SilentlyContinue | |
Write-Host "Restore and Starting Windows Search Service..." | |
Set-Service "WSearch" -StartupType Automatic | |
Start-Service "WSearch" -WarningAction SilentlyContinue | |
Write-Host "Restore Windows Search Icon..." | |
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" -Name "SearchboxTaskbarMode" -Type DWord -Value 1 | |
Write-Host "Done - Reverted to Stock Settings" | |
}) | |
$HTrayIcons.Add_Click({ | |
$ErrorActionPreference = 'SilentlyContinue' | |
Write-Host "Hiding tray icons..." | |
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" -Name "EnableAutoTray" -ErrorAction SilentlyContinue | |
Write-Host "Done - Reverted to Stock Settings" | |
}) | |
$EnableClipboardHistory.Add_Click({ | |
Write-Host "Restoring Clipboard History..." | |
Remove-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Clipboard" -Name "EnablenableClipboardHistory" -ErrorAction SilentlyContinue | |
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\System" -Name "AllowClipboardHistory" -ErrorAction SilentlyContinue | |
Write-Host "Done - Reverted to Stock Settings" | |
}) | |
$deltempfiles.Add_Click({ | |
$yesno = $wshell.Popup("Deleting Temporary files is safe, because Windows won't let you delete a file or folder that's in use, and other files that is not in use won't be needed again (it will only delete useless file). So it is recommwnded to delete temp files which speed things up. Press YES to delete",0," Deleting Temporary files",0x4) | |
if($yesno -eq 6) | |
{ | |
$tempfolders = @( "C:\Windows\Temp\*", "C:\Windows\Prefetch\*", "$env:temp\*" ) | |
# Remove-Item $tempfolders -recurse -force | |
$data = Get-ChildItem $tempfolders -recurse | Measure-Object -property length -sum | |
if ($data.sum -ige 1074000000){ | |
$inbytes = $data.sum / 1074000000 | |
$inmbs = "$inbytes".split(".") | |
$size = $inmbs[0] + "." + $inmbs[1][0] + $inmbs[1][1] + " Gbs" | |
}elseif ($data.sum -ige 1049000){ | |
$inbytes = $data.sum / 1049000 | |
$inmbs = "$inbytes".split(".") | |
$size = $inmbs[0] + "." + $inmbs[1][0] + $inmbs[1][1] + " mbs" | |
}else{ $size = -join($data.sum, " ", "bytes") } | |
$count = -join($data.count, " ", "temporary files") | |
Write-Host "`nTotal $count size of $size removed" | |
} | |
}) | |
$EnableLocation.Add_Click({ | |
Write-Host "Enabling Location Provider..." | |
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" -Name "DisableWindowsLocationProvider" -ErrorAction SilentlyContinue | |
Write-Host "Enabling Location Scripting..." | |
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" -Name "DisablenableLocationScripting" -ErrorAction SilentlyContinue | |
Write-Host "Enabling Location..." | |
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\LocationAndSensors" -Name "DisablenableLocation" -ErrorAction SilentlyContinue | |
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" -Name "SensorPermissionState" -ErrorAction SilentlyContinue | |
Set-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" -Name "Value" -Type String -Value "Allow" | |
Write-Host "Allow access to Location..." | |
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\CapabilityAccessManager\ConsentStore\location" -Name "Value" -Type String -Value "Allow" | |
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\lfsvc\Service\Configuration" -Name "Status" -Type DWord -Value "1" | |
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsAccessLocation" -ErrorAction SilentlyContinue | |
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsAccessLocation_UserInControlOfTheseApps" -ErrorAction SilentlyContinue | |
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsAccessLocation_ForceAllowTheseApps" -ErrorAction SilentlyContinue | |
Remove-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\AppPrivacy" -Name "LetAppsAccessLocation_ForceDenyTheseApps" -ErrorAction SilentlyContinue | |
Write-Host "Done - Reverted to Stock Settings" | |
}) | |
$EnableBackgroundApps.Add_Click({ | |
Write-Host "Allowing 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 | |
} | |
Write-Host "Done - Reverted to Stock Settings" | |
}) | |
$RemoveMsStore.Add_Click( { | |
$ErrorActionPreference = 'SilentlyContinue' | |
Get-AppxPackage -Name "*Microsoft.WindowsStore*"| Remove-AppxPackage | |
Get-AppxProvisionedPackage -Online | Where-Object DisplayName -like "*Microsoft.WindowsStore*" | Remove-AppxProvisionedPackage -Online | |
Write-Host "Operation Completed." | |
}) | |
[void]$Form.ShowDialog() |
Other great tools for reference:
- https://github.com/ChrisTitusTech/winutil OR https://christitus.com/windows-tool/
- https://github.com/ChrisTitusTech/win10script
- https://github.com/WinTweakers/WindowsToolbox
- https://github.com/pabumake/windowToolboxMalware-Removal
BAD ONE:
- https://archive.org/details/github.com-windowtoolbox-powershell-windows-toolbox_-_2022-01-13_13-30-37 (ORIGINAL ONE)
- https://github.com/tkimondok/windowtoolbox (this is someone who created/forked files from original windowtoolbox malware)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Run powershell as Administrator, then run the following command:
powershell -executionpolicy bypass -File .\windowtoolkit1.ps1
OR:
iwr -useb https://gist.github.com/meetnick/bc113c61bc95d4ac90b5adab1be3f615/raw/a9eb9ee66acee051b789ed23f2b08b25b7f912f1/windowtoolkit.ps1 | iex