From b779b8c1f2cba1935911ca64b9914749f3c414b3 Mon Sep 17 00:00:00 2001 From: Raphire <9938813+Raphire@users.noreply.github.com> Date: Thu, 6 Mar 2025 00:01:04 +0100 Subject: [PATCH] Fix running script as user using the `Quick Method` --- Get.ps1 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Get.ps1 b/Get.ps1 index 2e1b99d..051cbbc 100644 --- a/Get.ps1 +++ b/Get.ps1 @@ -84,7 +84,14 @@ Expand-Archive "$env:TEMP/win11debloat-temp.zip" "$env:TEMP/Win11Debloat" Remove-Item "$env:TEMP/win11debloat-temp.zip" # Make list of arguments to pass on to the script -$arguments = $($PSBoundParameters.GetEnumerator() | ForEach-Object {"-$($_.Key)"}) +$arguments = $($PSBoundParameters.GetEnumerator() | ForEach-Object { + if ($_.Value -eq $true) { + "-$($_.Key)" + } + else { + "-$($_.Key) ""$($_.Value)""" + } +}) Write-Output "" Write-Output "> Running Win11Debloat..."