commit 5fb84ce044826118d1ddf41ab7f3aedcd30b8b7d Author: Alex Hirsch Date: Tue Aug 4 00:15:03 2015 +0200 init commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..0fc9a4b --- /dev/null +++ b/README.md @@ -0,0 +1,35 @@ +# Debloat Windows 10 + +This project is an effort to collect scripts which help *debloating* Windows +10. + +I personally find the state Windows 10 comes in quite shocking / scary and want +to have very slim, scriptable solution to remove and disable Windows 10's +features most people do not need nor want. + +The scripts provided consists of Powershell scripts and Registry keys, you +should have no problems altering and using them to fit your needs. Do not +forget to set the execution policy for Powershell scripts. And of course, how +have to run them with administrative priveledges. + + PS> Set-ExecutionPolicy RemoteSigned + +Look at the scripts most of them are only a couple of lines long and it should +be pretty obvious what they are doing. + +## Contribute + +I would be happy to extend the collection of scripts. Just open an issue or +send me a pull request. + +## License + + "THE BEER-WARE LICENSE" (Revision 42): + + As long as you retain this notice you can do whatever you want with this + stuff. If we meet some day, and you think this stuff is worth it, you can + buy us a beer in return. + + This project is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. diff --git a/scripts/add-run-with-powershell-as-administrator.reg b/scripts/add-run-with-powershell-as-administrator.reg new file mode 100644 index 0000000..042b936 --- /dev/null +++ b/scripts/add-run-with-powershell-as-administrator.reg @@ -0,0 +1,4 @@ +Windows Registry Editor Version 5.00 + +[HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\RunAs\Command] +@="\"C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe\" \"%1\"" \ No newline at end of file diff --git a/scripts/disable-defender.reg b/scripts/disable-defender.reg new file mode 100644 index 0000000..8bcf619 Binary files /dev/null and b/scripts/disable-defender.reg differ diff --git a/scripts/disable-onedrive.reg b/scripts/disable-onedrive.reg new file mode 100644 index 0000000..1fff12a Binary files /dev/null and b/scripts/disable-onedrive.reg differ diff --git a/scripts/disable-services.ps1 b/scripts/disable-services.ps1 new file mode 100644 index 0000000..a93cf0a --- /dev/null +++ b/scripts/disable-services.ps1 @@ -0,0 +1,24 @@ +# Description: +# This script disables unwanted Windows services. If you do not want to disable +# certain services comment out the corresponding lines below. + +$services = @( + "HomeGroupListener" + "HomeGroupProvider" + "MapsBroker" + "NetTcpPortSharing" + "RemoteAccess" + "RemoteRegistry" + "SharedAccess" + "WbioSrvc" + "XblAuthManager" + "XblGameSave" + "XboxNetApiSvc" + "dmwappushservice" + "lfsvc" + #"wscsvc" +) + +foreach ($service in $services) { + Get-Service -Name $service | Set-Service -StartupType Disabled +} \ No newline at end of file diff --git a/scripts/disable-settingssync.reg b/scripts/disable-settingssync.reg new file mode 100644 index 0000000..277e57a Binary files /dev/null and b/scripts/disable-settingssync.reg differ diff --git a/scripts/disable-telemetry.ps1 b/scripts/disable-telemetry.ps1 new file mode 100644 index 0000000..17a13b4 --- /dev/null +++ b/scripts/disable-telemetry.ps1 @@ -0,0 +1,58 @@ +# Description: +# This script redirects telemetry related domains to your nowhere using the +# hosts file. + +$hosts = "0.0.0.0 vortex.data.microsoft.com +0.0.0.0 vortex-win.data.microsoft.com +0.0.0.0 telecommand.telemetry.microsoft.com +0.0.0.0 telecommand.telemetry.microsoft.com.nsatc.net +0.0.0.0 oca.telemetry.microsoft.com +0.0.0.0 oca.telemetry.microsoft.com.nsatc.net +0.0.0.0 sqm.telemetry.microsoft.com +0.0.0.0 sqm.telemetry.microsoft.com.nsatc.net +0.0.0.0 watson.telemetry.microsoft.com +0.0.0.0 watson.telemetry.microsoft.com.nsatc.net +0.0.0.0 redir.metaservices.microsoft.com +0.0.0.0 choice.microsoft.com +0.0.0.0 choice.microsoft.com.nsatc.net +0.0.0.0 df.telemetry.microsoft.com +0.0.0.0 reports.wes.df.telemetry.microsoft.com +0.0.0.0 wes.df.telemetry.microsoft.com +0.0.0.0 services.wes.df.telemetry.microsoft.com +0.0.0.0 sqm.df.telemetry.microsoft.com +0.0.0.0 telemetry.microsoft.com +0.0.0.0 watson.ppe.telemetry.microsoft.com +0.0.0.0 telemetry.appex.bing.net +0.0.0.0 telemetry.urs.microsoft.com +0.0.0.0 telemetry.appex.bing.net:443 +0.0.0.0 settings-sandbox.data.microsoft.com +0.0.0.0 vortex-sandbox.data.microsoft.com +0.0.0.0 survey.watson.microsoft.com +0.0.0.0 watson.live.com +0.0.0.0 watson.microsoft.com +0.0.0.0 statsfe2.ws.microsoft.com +0.0.0.0 corpext.msitadfs.glbdns2.microsoft.com +0.0.0.0 compatexchange.cloudapp.net +0.0.0.0 cs1.wpc.v0cdn.net +0.0.0.0 a-0001.a-msedge.net +0.0.0.0 statsfe2.update.microsoft.com.akadns.net +0.0.0.0 sls.update.microsoft.com.akadns.net +0.0.0.0 fe2.update.microsoft.com.akadns.net +0.0.0.0 65.55.108.23 +0.0.0.0 65.39.117.230 +0.0.0.0 23.218.212.69 +0.0.0.0 134.170.30.202 +0.0.0.0 137.116.81.24 +0.0.0.0 diagnostics.support.microsoft.com +0.0.0.0 corp.sts.microsoft.com +0.0.0.0 statsfe1.ws.microsoft.com +0.0.0.0 pre.footprintpredict.com +0.0.0.0 204.79.197.200 +0.0.0.0 23.218.212.69 +0.0.0.0 i1.services.social.microsoft.com +0.0.0.0 i1.services.social.microsoft.com.nsatc.net +0.0.0.0 feedback.windows.com +0.0.0.0 feedback.microsoft-hohm.com +0.0.0.0 feedback.search.microsoft.com" + +echo $hosts >> "$env:systemroot\System32\drivers\etc\hosts" \ No newline at end of file diff --git a/scripts/disable-telemetry.reg b/scripts/disable-telemetry.reg new file mode 100644 index 0000000..b33e1ea Binary files /dev/null and b/scripts/disable-telemetry.reg differ diff --git a/scripts/disable-windows-features.ps1 b/scripts/disable-windows-features.ps1 new file mode 100644 index 0000000..e5243b4 --- /dev/null +++ b/scripts/disable-windows-features.ps1 @@ -0,0 +1,12 @@ +# Description: +# This script disables unwanted Windows features. If you do not want to +# disable certain features comment out the corresponding lines below. + +$features = @( + "Internet-Explorer-Optional-amd64" + "MediaPlayback" + "WindowsMediaPlayer" + "WorkFolders-Client" +) + +Disable-WindowsOptionalFeature -Online -NoRestart -FeatureName $features \ No newline at end of file diff --git a/scripts/install-sysinternals.ps1 b/scripts/install-sysinternals.ps1 new file mode 100644 index 0000000..a086cb2 --- /dev/null +++ b/scripts/install-sysinternals.ps1 @@ -0,0 +1,20 @@ +# Description: +# This script installs the sysinternals suit into your default drive's root +# directory. + +$ErrorActionPreference = "Stop" + +$download_uri = "https://download.sysinternals.com/files/SysinternalsSuite.zip" + +echo "Downloading SysinternalsSuite zipfile" + +# TODO replace this with wget when it works again on a clean install +$wc = new-object net.webclient +$wc.DownloadFile($download_uri, "/SysinternalsSuite.zip") + +echo "Extracting SysinternalsSuite zipfile" +Add-Type -AssemblyName "system.io.compression.filesystem" +[io.compression.zipfile]::ExtractToDirectory("/SysinternalsSuite.zip", "/Sysinternals") + +echo "Removing zipfile" +rm "/SysinternalsSuite.zip" \ No newline at end of file diff --git a/scripts/remove-default-apps.ps1 b/scripts/remove-default-apps.ps1 new file mode 100644 index 0000000..eb55cef --- /dev/null +++ b/scripts/remove-default-apps.ps1 @@ -0,0 +1,45 @@ +# Description: +# This script removes unwanted Apps that come with Windows. Errors may occure +# during the process. If you do not want to remove certain Apps comment out +# the corresponding lines below. + +$apps = @( + "Microsoft.3DBuilder" + "Microsoft.Appconnector" + "Microsoft.BingFinance" + "Microsoft.BingNews" + "Microsoft.BingSports" + "Microsoft.BingWeather" + "Microsoft.BioEnrollment" + "Microsoft.Getstarted" + #"Microsoft.MicrosoftEdge" + "Microsoft.MicrosoftOfficeHub" + "Microsoft.MicrosoftSolitaireCollection" + "Microsoft.Office.OneNote" + "Microsoft.People" + "Microsoft.SkypeApp" + "Microsoft.Windows.Cortana" + "Microsoft.Windows.Photos" + "Microsoft.WindowsAlarms" + "Microsoft.WindowsCalculator" + "Microsoft.WindowsCamera" + "Microsoft.WindowsFeedback" + "Microsoft.WindowsMaps" + "Microsoft.WindowsPhone" + "Microsoft.WindowsSoundRecorder" + "Microsoft.WindowsStore" + "Microsoft.XboxApp" + "Microsoft.XboxGameCallableUI" + "Microsoft.XboxIdentityProvider" + "Microsoft.ZuneMusic" + "Microsoft.ZuneVideo" + "microsoft.windowscommunicationsapps" +) + +foreach ($app in $apps) { + Get-AppxPackage -Name $app -AllUsers | Remove-AppxPackage + + Get-AppXProvisionedPackage -Online | + where DisplayName -EQ $app | + Remove-AppxProvisionedPackage -Online +} diff --git a/scripts/remove-onedrive.ps1 b/scripts/remove-onedrive.ps1 new file mode 100644 index 0000000..b6385d4 --- /dev/null +++ b/scripts/remove-onedrive.ps1 @@ -0,0 +1,19 @@ +# Description: +# This script removes OneDrive files from your system. + +echo "Kill OneDrive process" +kill "OneDrive.exe" + +echo "Remove OneDrive" +if (Test-Path "$env:systemroot\System32\OneDriveSetup.exe") { + & "$env:systemroot\System32\OneDriveSetup.exe" /uninstall +} +if (Test-Path "$env:systemroot\System32\OneDriveSetup.exe") { + & "$env:systemroot\System32\OneDriveSetup.exe" /uninstall +} + +echo "Removing OneDrive leftovers" +rm -r -Force "$env:localappdata\Microsoft\OneDrive" +rm -r -Force "$env:programdata\Microsoft OneDrive" +rm -r -Force "$env:userprofile\OneDrive" +rm -r -Force "C:\OneDriveTemp" \ No newline at end of file diff --git a/scripts/remove-run-with-powershell-as-administrator.reg b/scripts/remove-run-with-powershell-as-administrator.reg new file mode 100644 index 0000000..d0dc858 --- /dev/null +++ b/scripts/remove-run-with-powershell-as-administrator.reg @@ -0,0 +1,3 @@ +Windows Registry Editor Version 5.00 + +[-HKEY_CLASSES_ROOT\Microsoft.PowerShellScript.1\Shell\RunAs] \ No newline at end of file