Last active
January 22, 2021 16:28
-
-
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)
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
@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