mirror of
https://github.com/Raphire/Win11Debloat.git
synced 2025-11-17 02:56:17 +00:00
Quick method now downloads script without git
Fixed typo in README.md (Thanks to @eltociear)
This commit is contained in:
55
Get.ps1
55
Get.ps1
@@ -42,47 +42,32 @@ Write-Output "------------------------------------------------------------------
|
||||
Write-Output " Win11Debloat Script - Get"
|
||||
Write-Output "-------------------------------------------------------------------------------------------"
|
||||
|
||||
# Make sure winget is installed and is at least v1.4
|
||||
if ((Get-AppxPackage -Name "*Microsoft.DesktopAppInstaller*") -and ((winget -v) -replace 'v','' -gt 1.4)) {
|
||||
# Check if git is installed. Install git if it isn't installed yet
|
||||
try
|
||||
{
|
||||
git | Out-Null
|
||||
}
|
||||
catch [System.Management.Automation.CommandNotFoundException]
|
||||
{
|
||||
Write-Output "> Installing git..."
|
||||
winget install git.git --accept-package-agreements --accept-source-agreements --disable-interactivity --no-upgrade
|
||||
# Navigate to user temp directory
|
||||
cd $env:TEMP
|
||||
|
||||
# Add default install location of git to path
|
||||
$env:Path += ';C:\Program Files\Git\cmd'
|
||||
Write-Output "> Downloading Win11Debloat..."
|
||||
|
||||
Write-Output ""
|
||||
}
|
||||
# Download latest version of Win11Debloat from github as zip archive
|
||||
wget http://github.com/raphire/win11debloat/archive/master.zip -O win11debloat-temp.zip
|
||||
|
||||
# Navigate to user temp directory
|
||||
cd $env:TEMP
|
||||
# Unzip archive to Win11Debloat folder
|
||||
Expand-Archive win11debloat-temp.zip Win11Debloat
|
||||
|
||||
# Download Win11Debloat from github
|
||||
Write-Output "> Downloading Win11Debloat..."
|
||||
git clone https://github.com/Raphire/Win11Debloat/
|
||||
# Remove archive
|
||||
rm win11debloat-temp.zip
|
||||
|
||||
# Make list of arguments
|
||||
$args = $($PSBoundParameters.GetEnumerator() | ForEach-Object {"-$($_.Key)"})
|
||||
# Make list of arguments to pass on to the script
|
||||
$args = $($PSBoundParameters.GetEnumerator() | ForEach-Object {"-$($_.Key)"})
|
||||
|
||||
Write-Output ""
|
||||
Write-Output ""
|
||||
|
||||
# Start & run script with the provided arguments
|
||||
Write-Output "> Running Win11Debloat..."
|
||||
$debloatProcess = Start-Process powershell.exe -PassThru -ArgumentList "-executionpolicy bypass -File .\Win11Debloat\Win11Debloat.ps1 $args"
|
||||
$debloatProcess.WaitForExit()
|
||||
# Run Win11Debloat script with the provided arguments
|
||||
Write-Output "> Running Win11Debloat..."
|
||||
$debloatProcess = Start-Process powershell.exe -PassThru -ArgumentList "-executionpolicy bypass -File .\Win11Debloat\Win11Debloat-master\Win11Debloat.ps1 $args"
|
||||
$debloatProcess.WaitForExit()
|
||||
|
||||
Write-Output ""
|
||||
Write-Output ""
|
||||
|
||||
# Cleanup, remove Win11Debloat directory
|
||||
Write-Output "> Cleaning up..."
|
||||
Remove-Item -LiteralPath "Win11Debloat" -Force -Recurse
|
||||
}
|
||||
else {
|
||||
Write-Error "Unable to start script, WinGet is not installed or outdated."
|
||||
}
|
||||
# Cleanup, remove Win11Debloat directory
|
||||
Write-Output "> Cleaning up..."
|
||||
Remove-Item -LiteralPath "Win11Debloat" -Force -Recurse
|
||||
|
||||
@@ -217,14 +217,14 @@ The default mode applies the changes that are recommended for most users, expand
|
||||
|
||||
### Quick method
|
||||
|
||||
Download & run the script automatically via powershell. Please note that this will install git if it's not already installed on your system.
|
||||
Download & run the script automatically via powershell.
|
||||
|
||||
1. Open powershell as an administrator.
|
||||
2. Copy and paste the code below into powershell, press enter to run the script:
|
||||
```powershell
|
||||
& ([scriptblock]::Create((irm "https://raw.githubusercontent.com/Raphire/Win11Debloat/master/Get.ps1")))
|
||||
```
|
||||
3. Wait for the script to automatically install git and download Win11Debloat.
|
||||
3. Wait for the script to automatically download Win11Debloat.
|
||||
4. A new powershell window will open showing the Win11Debloat menu. Select either the default or custom mode to continue.
|
||||
5. Carefully read through and follow the on-screen instructions.
|
||||
|
||||
@@ -278,7 +278,7 @@ The quick and advanced method support parameters to tailor the behaviour of the
|
||||
| -RemoveApps | Remove the default selection of bloatware apps. |
|
||||
| -RemoveAppsCustom | Remove all apps from the 'CustomAppsList' file. IMPORTANT: Run the script with the `-RunAppConfigurator` parameter to create this file first. No apps will be removed if this file does not exist! |
|
||||
| -RunAppConfigurator | Run the app configurator to create a 'CustomAppsList' file. Run the script with the `-RemoveAppsCustom` parameter to remove these apps. |
|
||||
| -RemoveCommApps | Remove the Mail, Calender, and People apps. |
|
||||
| -RemoveCommApps | Remove the Mail, Calendar, and People apps. |
|
||||
| -RemoveW11Outlook | Remove the new Outlook for Windows app. |
|
||||
| -RemoveDevApps | Remove developer-related apps such as Remote Desktop, DevHome and Power Automate. |
|
||||
| -RemoveGamingApps | Remove the Xbox App and Xbox Gamebar. |
|
||||
|
||||
Reference in New Issue
Block a user