Raphire / Win11Debloat

A simple, easy to use PowerShell script to remove pre-installed apps from Windows, disable telemetry, remove Bing from Windows search as well as perform various other changes to declutter and improve your Windows experience. This script works for both Windows 10 and Windows 11.
MIT License
12.88k stars 546 forks source link

feature request: launch debloat script with one liner #55

Closed loadstring1 closed 4 months ago

loadstring1 commented 4 months ago

Something similiar to what MAS has. Launch the script with one liner (method 1) without having to download the entire github repo.

example screenshot: Zrzut ekranu 2024-05-09 205906

loadstring1 commented 4 months ago

Actually i just made one for you pls review my idea

pull request related to this issue: https://github.com/Raphire/Win11Debloat/pull/56

loadstring1 commented 4 months ago

and heres the one liner that i just made it works perfectly tested on windows 11 22h2 home edition

(must be ran with admin perms)

irm https://raw.githubusercontent.com/loadstring1/Win11Debloat/master/get.ps1 | iex
Abyssal-Fox commented 4 months ago

I'm not sure if this one liner could be combined with the RemoveAppsCustom list. But I assuming that it may be possible...

Raphire commented 4 months ago

Heya,

This has actually been requested before in issue https://github.com/Raphire/Win11Debloat/issues/39

I'll look into this and your PR this weekend when I have more time :)

loadstring1 commented 4 months ago

Heya,

This has actually been requested before in issue #39

I'll look into this and your PR this weekend when I have more time :)

thank you my script won't support every each windows version because it uses winget to install git then clones your repo and runs "run.bat" which then starts your debloat script

its not the best but works like i wanted it to work

Raphire commented 4 months ago

@loadstring1 Thanks for taking the time to work on Win11Debloat. I have adapted your solution provided in #56 to include support for parameters and, among a few other changes, added a check to ensure WinGet is installed. See: 7e89991

The command to run doesn't look as clean, but it'll do the job and avoids using Invoke-Expression (iex). This article by Microsoft explains why iex should be avoided if possible.

Closing issue as resolved 😎

loadstring1 commented 4 months ago

@loadstring1 Thanks for taking the time to work on Win11Debloat. I have adapted your solution provided in #56 to include support for parameters and, among a few other changes, added a check to ensure WinGet is installed. See: 7e89991

The command to run doesn't look as clean, but it'll do the job and avoids using Invoke-Expression (iex). This article by Microsoft explains why iex should be avoided if possible.

Closing issue as resolved 😎

thank you for allowing me to contribute to this project

ilyesm commented 4 months ago

We are trying to dpeloy this using our RMM for onboarding automation. How do you suggest we fix cases when winget is not installed? Install Winget followed by running the line?

Raphire commented 4 months ago

We are trying to dpeloy this using our RMM for onboarding automation. How do you suggest we fix cases when winget is not installed? Install Winget followed by running the line?

You could alternatively look into one of the other methods to run the script, but I think in your case simply installing WinGet may be the best option

This article has more information about WinGet that may be helpful: https://learn.microsoft.com/en-us/windows/package-manager/winget/

loadstring1 commented 4 months ago

Winget followed by running the line?

yes here is 1 line of code example from microsoft article that Raphire sent you

this will install winget and i think you need to reboot because for me it didnt work until i rebooted

Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe

Zrzut ekranu 2024-05-22 165426

Raphire commented 4 months ago

Winget followed by running the line?

yes here is 1 line of code example from microsoft article that Raphire sent you

this will install winget and i think you need to reboot because for me it didnt work until i rebooted

Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe

Zrzut ekranu 2024-05-22 165426

The reason why winget is not immediately recognized is because it won't be added to the path variable for the current powershell session. It should work if you start a new powershell session