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
You might want to set Set-ExecutionPolicy RemoteSigned before running Install-WindowsUpdate (from PSWindowsUpdate).
So it can actually run.
Technically you're then even supposed to save the current execution policy (Get-ExecutionPolicy) and then restore it after.
Erroneous Behavior
── 06:40:56 - Windows Update ───────────────────────────────────────────────────
The installer will request to run as administrator, expect a prompt.
Windows update failed:
0: Command failed: `C:\WINDOWS\system32\sudo.exe 'C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe' -NoProfile 'Install-WindowsUpdate -Verbose' -AcceptAll`
1: `C:\WINDOWS\system32\sudo.exe` failed: exit code: 1
Location: src\steps\powershell.rs:120 Retry? (y)es/(N)o/(s)hell/(q)uit
Expected Behavior
Powershell execution policy is set-up so Install-WindowsUpdate can run.
Steps to reproduce
topgrade --only system on a Windows system.
Possible Cause (Optional)
Restrictive PowerShell execution policies.
Problem persists without calling from topgrade
If I set the execution policy to RemoteSigned, then no.
Did you run topgrade through Remote Execution
Yes
No
Configuration file (Optional)
It's a freshly installed topgrade.
Additional Details
Operation System/Version
Windows 11 24H2 26100.2894
But it's a general PowerShell issue.
Installation
winget install topgrade
Topgrade version (topgrade -V)
topgrade 16.0.2
Verbose Output (topgrade -v)
The text was updated successfully, but these errors were encountered:
It appears you can tell that powershell.exe to use an execution policy override (-ExecutionPolicy RemoteSigned, order is important, don't put it at the end.):
You might want to set
Set-ExecutionPolicy RemoteSigned
before runningInstall-WindowsUpdate
(from PSWindowsUpdate).So it can actually run.
Technically you're then even supposed to save the current execution policy (Get-ExecutionPolicy) and then restore it after.
Erroneous Behavior
Expected Behavior
Powershell execution policy is set-up so Install-WindowsUpdate can run.
Steps to reproduce
topgrade --only system
on a Windows system.Possible Cause (Optional)
Restrictive PowerShell execution policies.
Problem persists without calling from topgrade
If I set the execution policy to RemoteSigned, then no.
Did you run topgrade through
Remote Execution
Configuration file (Optional)
It's a freshly installed topgrade.
Additional Details
Windows 11 24H2 26100.2894
But it's a general PowerShell issue.
winget install topgrade
topgrade -V
)topgrade 16.0.2
Verbose Output (
topgrade -v
)The text was updated successfully, but these errors were encountered: