You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
topgrade --cleanup --verbose --only system throws an error Start-Process : A positional parameter cannot be found that accepts argument 'PSWindowsUpdate'..
── 06:41:39 - Sudo ─────────────────────────────────────────────────────────────
DEBUG Executing command C:\Users\boyanzh\scoop\shims\sudo.cmd -v
-v: The term '-v' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
DEBUG Executing command hostname
DEBUG Executing command hostname
DEBUG Step "Windows update"
DEBUG Detected "C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe" as "powershell"
── 06:41:43 - Windows Update ───────────────────────────────────────────────────
DEBUG Executing command C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -Command 'Get-Module -ListAvailable PSWindowsUpdate'
DEBUG Executing command C:\Users\boyanzh\scoop\shims\sudo.cmd 'C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe' -NoProfile -Command 'Start-Process powershell -Verb runAs -ArgumentList '\''Import-Module PSWindowsUpdate; Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -Verbose'\'''
Start-Process : A positional parameter cannot be found that accepts argument 'PSWindowsUpdate'.
At line:1 char:1
Erroneous Behavior
topgrade --cleanup --verbose --only system
throws an errorStart-Process : A positional parameter cannot be found that accepts argument 'PSWindowsUpdate'.
.Expected Behavior
Steps to reproduce
On a Windows 11 machine with scoop installed,
Possible Cause (Optional)
#671 adds
Start-Process
but it does not work for me. I tried to revert that commit and it works.Problem persists without calling from topgrade
Did you run topgrade through
Remote Execution
If yes, does the issue still occur when you run topgrade directlly in your
remote host
Configuration file (Optional)
I tried both
pre_sudo = true
andpre_sudo = false
, the current version does not work but the old version works.Additional Details
Windows Version 23H2 OS Build 22631.3810
Build from repo
topgrade -V
)Topgrade 14.0.1
Verbose Output (
topgrade -v
)The Win32 internal error "The handle is invalid." 0x6 occurred while getting the console mode. Contact Microsoft Customer Support Services.
DEBUG Command failed: Err(
0: Command failed:
C:\Users\boyanzh\scoop\shims\sudo.cmd 'C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe' -NoProfile -Command 'Start-Process powershell -Verb runAs -ArgumentList '\''Import-Module PSWindowsUpdate; Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -Verbose'\'''
1:
C:\Users\boyanzh\scoop\shims\sudo.cmd
failed: exit code: 1Location:
src/steps/powershell.rs:122)
DEBUG Step "Windows update" failed:
0: Command failed:
C:\Users\boyanzh\scoop\shims\sudo.cmd 'C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe' -NoProfile -Command 'Start-Process powershell -Verb runAs -ArgumentList '\''Import-Module PSWindowsUpdate; Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -Verbose'\'''
1:
C:\Users\boyanzh\scoop\shims\sudo.cmd
failed: exit code: 1Location:
src/steps/powershell.rs:122
── 06:41:53 - Summary ──────────────────────────────────────────────────────────
Windows update: FAILED
DEBUG Desktop notification: Topgrade finished with errors
The text was updated successfully, but these errors were encountered: