memstechtips / UnattendedWinstall

Personalized Unattended Answer Files that helps automatically debloat and customize Windows 10 & 11 during the installation process.
MIT License
3.54k stars 400 forks source link

Can't run script even after running "Set-ExecutionPolicy RemoteSigned" #164

Closed trparky closed 2 weeks ago

trparky commented 2 weeks ago

This is my current setup...

Get-ExecutionPolicy -List

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

I executed Set-ExecutionPolicy RemoteSigned as per the suggestion yet nothing changes in the Get-ExecutionPolicy -List output. I still receive the following error... .\UWScript.ps1: File C:\Users\user\Downloads\UnattendedWinstall-2.0.0\UWScript.ps1 cannot be loaded. The file C:\Users\trpar\Downloads\UnattendedWinstall-2.0.0\UWScript.ps1 is not digitally signed. You cannot run this script on the current system. For more information about running scripts and setting execution policy, see about_Execution_Policies at https://go.microsoft.com/fwlink/?LinkID=135170.

drakin003 commented 2 weeks ago

set it to unrestricted then try :)

memstechtips commented 2 weeks ago

@trparky Run Set-ExecutionPolicy Unrestricted in PowerShell and then try run the UWScript.ps1 file again. You can also right click the file and select "Run with PowerShell."