Something strange happened to me when I was working on some automation for Windows 10. No matter what I did, PowerShell scripting would not enable. See below.
File C:\Setup\Test.ps1 cannot be loaded because the execution of scripts is disabled on this system. Please see “get- help about_signing” for more details. At line:1
Open registry, Start > Run > Regedit
Navigate to HKLM\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell
Create ExecutionPolicy as REG_SZ, with value RemoteSigned
Open PowerShell and run Get-ExecutionPolicy to verify it is working
If you’re doing an upgrade, make sure you add the above reg key before upgrading.