Closed BobG1983 closed 2 months ago
Running topgrade on Windows 11 with PSWindowsUpdate installed returns an error:
── 11:18:21 - Windows Update ─────────────────────────────────────────────────── Start-Process : A positional parameter cannot be found that accepts argument 'PSWindowsUpdate'. At line:1 char:1 + Start-Process powershell -Verb runAs -ArgumentList Import-Module PSW ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [Start-Process], ParameterBindingException + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.StartProcessCommand The Win32 internal error "The handle is invalid" 0x6 occurred while getting console output buffer information. Contact Microsoft Customer Support Services. Windows update failed: 0: Command failed: `D:\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: `D:\scoop\shims\sudo.cmd` failed: exit code: 1 Location: src\steps\powershell.rs:122
Windows update should run
I don't really know. All I did was cargo binstall topgrade, install PSWindowsUpdate as follows:
Install-Module -Name PSWindowsUpdate -Force Get-Package -Name PSWindowsUpdate
Remote Execution
Operation System/Version Windows 11 Home Version 10.0.22631 Build 22631
Installation
cargo install cargo-binstall cargo binstall topgrade
Topgrade version (topgrade -V) Topgrade 15.0.0
topgrade -V
topgrade -v
── 11:24:43 - Windows Update ─────────────────────────────────────────────────── DEBUG Executing command `C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -Command 'Get-Module -ListAvailable PSWindowsUpdate'` DEBUG Executing command `D:\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 + Start-Process powershell -Verb runAs -ArgumentList Import-Module PSW ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [Start-Process], ParameterBindingException + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.StartProcessCommand The Win32 internal error "The handle is invalid" 0x6 occurred while getting console output buffer information. Contact Microsoft Customer Support Services. DEBUG Command failed: Err( 0: Command failed: `D:\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: `D:\scoop\shims\sudo.cmd` failed: exit code: 1 Location: src\steps\powershell.rs:122) DEBUG Step "Windows update" failed: 0: Command failed: `D:\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: `D:\scoop\shims\sudo.cmd` failed: exit code: 1 Location: src\steps\powershell.rs:122 Windows update failed: 0: Command failed: `D:\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: `D:\scoop\shims\sudo.cmd` failed: exit code: 1 Location: src\steps\powershell.rs:122
Erroneous Behavior
Running topgrade on Windows 11 with PSWindowsUpdate installed returns an error:
Expected Behavior
Windows update should run
Steps to reproduce
I don't really know. All I did was cargo binstall topgrade, install PSWindowsUpdate as follows:
Problem persists without calling from topgrade
Did you run topgrade through
Remote Execution
Additional Details
Operation System/Version Windows 11 Home Version 10.0.22631 Build 22631
Installation
Topgrade version (
topgrade -V
) Topgrade 15.0.0Verbose Output (
topgrade -v
)