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
Import-Module : File
C:\Users\dsieradski\OneDrive\Documents\PowerShell\Modules\PSWindowsUpdate\2.2.0.3\PSWindowsUpdate.psm1 cannot be
loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at
https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ Import-Module PSWindowsUpdate; Install-WindowsUpdate -MicrosoftUpdate ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [Import-Module], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess,Microsoft.PowerShell.Commands.ImportModuleCommand
Install-WindowsUpdate : The 'Install-WindowsUpdate' command was found in the module 'PSWindowsUpdate', but the
module could not be loaded. For more information, run 'Import-Module PSWindowsUpdate'.
At line:1 char:32
+ Import-Module PSWindowsUpdate; Install-WindowsUpdate -MicrosoftUpdate ...
+ ~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Install-WindowsUpdate:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CouldNotAutoloadMatchingModule
Windows update failed:
0: Command failed: `C:\windows\System32\WindowsPowerShell\v1.0\powershell.EXE -NoProfile -Command 'Import-Module PSWindowsUpdate; Install-WindowsUpdate -MicrosoftUpdate -AcceptAll -Verbose'`
1: `C:\windows\System32\WindowsPowerShell\v1.0\powershell.EXE` failed: exit code: 1
Expected Behavior
For the update to run as expected.
Steps to reproduce
topgrade --only system
Possible Cause (Optional)
C:\windows\System32\WindowsPowerShell\v1.0\powershell.EXE is a restricted and outdated version of PowerShell. You should use pwsh instead, which is the modern version, if it's available and present in the path.
Problem persists without calling from topgrade
Yes
No
Did you run topgrade through Remote Execution
Yes
No
If yes, does the issue still occur when you run topgrade directlly in your
remote host
Yes
No
Additional Details
Operation System/Version
Windows 10 Education 22H2
Erroneous Behavior
Expected Behavior
For the update to run as expected.
Steps to reproduce
topgrade --only system
Possible Cause (Optional)
C:\windows\System32\WindowsPowerShell\v1.0\powershell.EXE
is a restricted and outdated version of PowerShell. You should usepwsh
instead, which is the modern version, if it's available and present in the path.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
Additional Details
Operation System/Version
Windows 10 Education 22H2
Installation
Cargo
Topgrade version (
topgrade -V
)12.0.2
Verbose Output (
topgrade -v
)The text was updated successfully, but these errors were encountered: