Help with Running a ps1 Powershell script on Windows 10 to Fix Windows 10 update error - 0x80070643

Futureized

Skilled
My windows updates seems to be stuck since last month due to a bug in updates from MS.. They gave a fix as mentioned below.

Completely new to powershell and scripts associated.
I have to fix using this script - https://support.microsoft.com/en-us...24-20666-0190331b-1ca3-42d8-8a55-7fc406910c10

But not sure as to which policies to be allowed on local PC neither commands, took some help from internet but script seems running since last 30 minutes. (check attachment)
Attached script file as well in .txt

1. Can someone how to run proper commands and from where (CMD or powershellscript GUI)
2. Also the commands need to enable policies and disable them when work is done.
3 .Best way to run the script.
 

Attachments

  • Capture.PNG
    Capture.PNG
    239.8 KB · Views: 46
  • sc.txt
    9.4 KB · Views: 28
First run this to check current settings Get-ExecutionPolicy -List
Set-ExecutionPolicy Restricted - default execution policy for Windows client computers
Code:
C:\Windows\System32>powershell.exe Get-ExecutionPolicy -List

        Scope ExecutionPolicy
        ----- ---------------
MachinePolicy       Undefined
   UserPolicy       Undefined
      Process       Undefined
  CurrentUser    RemoteSigned
 LocalMachine    Unrestricted
Code:
C:\Windows\System32>powershell.exe Get-ExecutionPolicy -List

        Scope ExecutionPolicy
        ----- ---------------
MachinePolicy       Undefined
   UserPolicy       Undefined
      Process       Undefined
  CurrentUser    RemoteSigned
 LocalMachine    Unrestricted
IF you can guide with right commands to set right policy, will be useful
 
Code:
C:\Windows\System32>powershell.exe Get-ExecutionPolicy -List

        Scope ExecutionPolicy
        ----- ---------------
MachinePolicy       Undefined
   UserPolicy       Undefined
      Process       Undefined
  CurrentUser    RemoteSigned
 LocalMachine    Unrestricted

IF you can guide with right commands to set right policy, will be useful
Run this command
Set-ExecutionPolicy Restricted
 
Run this command
Set-ExecutionPolicy Restricted
Code:
C:\Windows\system32>powershell.exe Set-ExecutionPolicy Restricted
Set-ExecutionPolicy : Windows PowerShell updated your execution policy successfully, but the setting is overridden by
a policy defined at a more specific scope.  Due to the override, your shell will retain its current effective
execution policy of RemoteSigned. Type "Get-ExecutionPolicy -List" to view your execution policy settings. For more
information please see "Get-Help Set-ExecutionPolicy".
At line:1 char:1
+ Set-ExecutionPolicy Restricted
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : PermissionDenied: (:) [Set-ExecutionPolicy], SecurityException
    + FullyQualifiedErrorId : ExecutionPolicyOverride,Microsoft.PowerShell.Commands.SetExecutionPolicyCommand

I am running CMD as admistrator
 
Back
Top