Running script with -Verbose parameter now shows app uninstall progress bars

Linting
This commit is contained in:
Raphire
2024-08-17 00:08:09 +02:00
parent 60f944d116
commit 7cd8f063c7
2 changed files with 21 additions and 13 deletions

View File

@@ -1,5 +1,6 @@
param (
[switch]$Silent,
[switch]$Verbose,
[switch]$Sysprep,
[switch]$RunAppConfigurator,
[switch]$RunDefaults, [switch]$RunWin11Defaults,
@@ -59,7 +60,7 @@ Write-Output "> Downloading Win11Debloat..."
Invoke-WebRequest http://github.com/raphire/win11debloat/archive/master.zip -OutFile "$env:TEMP/win11debloat-temp.zip"
# Remove old script folder if it exists
if(Test-Path "$env:TEMP/Win11Debloat") {
if (Test-Path "$env:TEMP/Win11Debloat") {
Write-Output ""
Write-Output "> Cleaning up old Win11Debloat folder..."
Remove-Item -LiteralPath "$env:TEMP/Win11Debloat" -Force -Recurse
@@ -84,7 +85,7 @@ Write-Output "> Running Win11Debloat..."
$debloatProcess = Start-Process powershell.exe -PassThru -ArgumentList "-executionpolicy bypass -File $env:TEMP\Win11Debloat\Win11Debloat-master\Win11Debloat.ps1 $arguments" -Verb RunAs
# Wait for the process to finish before continuing
if($debloatProcess -ne $null) {
if ($null -ne $debloatProcess) {
$debloatProcess.WaitForExit()
}