Error: "File x cannot be loaded because running scripts is disabled on this system" when running a PowerShell script


Symptoms

When you run a PowerShell script in Windows 10, you receive the following message, where x is the location and name of the script file you attempted to run:

File x cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170.
+ CategoryInfo : SecurityError: (:) [], ParentContainsErrorRecordException
+FullyQualifiedErrorId : UnauthorizedAccess

example screenshot

Cause

Security settings on your computer are configured by default to block unsigned scripts from executing.

Resolution

Add a digital signature to your scripts. If you do not have a code signing certificate, you may request one from the TTU IT Division.


OUTCOME

You will be able to execute the scripts successfully.