Skip to content

Instantly share code, notes, and snippets.

@maxwelleite
Last active January 22, 2021 16:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maxwelleite/5eef8d3a6955e38249f69e8e91d6d976 to your computer and use it in GitHub Desktop.
Save maxwelleite/5eef8d3a6955e38249f69e8e91d6d976 to your computer and use it in GitHub Desktop.
Batch script to download latest Windows10Debloater script and execute for remove all bloatware from Windows 10 (only Debloat)
@echo off
:: Author: Maxwel Leite
:: Website: http://needforbits.wordpress.com/
:: Description: Batch script to download latest Windows10Debloater* script
:: and execute for remove all bloatware from Windows 10 (only Debloat).
:: * Script to remove Windows 10 bloatware (https://github.com/Sycnex/Windows10Debloater)
::
if not "%1"=="am_admin" call powershell -h | %WINDIR%\System32\find.exe /i "powershell" > nul && if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin > nul & exit)
setlocal
cd /d %~dp0
rem clean
rd /s /q "Windows10SysPrepDebloater.ps1" > nul
echo Download the latest powershell script Windows10SysPrepDebloater.ps1
powershell -command "Invoke-WebRequest https://github.com/Sycnex/Windows10Debloater/raw/master/Windows10SysPrepDebloater.ps1 -OutFile Windows10SysPrepDebloater.ps1"
echo Execute Windows10SysPrepDebloater.ps1 with debloat parameter
powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0Windows10SysPrepDebloater.ps1" "-Sysprep" "-Debloat"
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment