From c6e3edbe4057ffdd55f476074993b3fabac4f655 Mon Sep 17 00:00:00 2001 From: Raphire <9938813+Raphire@users.noreply.github.com> Date: Sun, 1 Feb 2026 13:37:27 +0100 Subject: [PATCH] Minimize Win11Debloat powershell window when not running CLI mode --- Get.ps1 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Get.ps1 b/Get.ps1 index d2ffe45..eef4779 100644 --- a/Get.ps1 +++ b/Get.ps1 @@ -140,8 +140,15 @@ $arguments = $($PSBoundParameters.GetEnumerator() | ForEach-Object { Write-Output "" Write-Output "> Running Win11Debloat..." +# Minimize the powershell window when CLI is not specified +if (-not $CLI) { + $windowStyle = "Minimized" +} else { + $windowStyle = "Normal" +} + # Run Win11Debloat script with the provided arguments -$debloatProcess = Start-Process powershell.exe -PassThru -ArgumentList "-executionpolicy bypass -File $env:TEMP\Win11Debloat\Win11Debloat.ps1 $arguments" -Verb RunAs +$debloatProcess = Start-Process powershell.exe -WindowStyle $windowStyle -PassThru -ArgumentList "-executionpolicy bypass -File $env:TEMP\Win11Debloat\Win11Debloat.ps1 $arguments" -Verb RunAs # Wait for the process to finish before continuing if ($null -ne $debloatProcess) {