Skip to content

Commit b779b8c

Browse files
committed
Fix running script as user using the Quick Method
1 parent 875d55f commit b779b8c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Get.ps1

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,14 @@ Expand-Archive "$env:TEMP/win11debloat-temp.zip" "$env:TEMP/Win11Debloat"
8484
Remove-Item "$env:TEMP/win11debloat-temp.zip"
8585

8686
# Make list of arguments to pass on to the script
87-
$arguments = $($PSBoundParameters.GetEnumerator() | ForEach-Object {"-$($_.Key)"})
87+
$arguments = $($PSBoundParameters.GetEnumerator() | ForEach-Object {
88+
if ($_.Value -eq $true) {
89+
"-$($_.Key)"
90+
}
91+
else {
92+
"-$($_.Key) ""$($_.Value)"""
93+
}
94+
})
8895

8996
Write-Output ""
9097
Write-Output "> Running Win11Debloat..."

0 commit comments

Comments
 (0)