Click here to Skip to main content
12,890,388 members (54,275 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


4 bookmarked
Posted 10 Feb 2014

Powershell-”File cannot be loaded”

, 10 Feb 2014 CPOL
Rate this:
Please Sign up or sign in to vote.
Powershell - "File cannot be loaded"

Recently, I upgraded my office laptop to Windows 8. After my Powershell ISE stopped responding in fact working on Windows 7.

After few days, I was forced to work on one Powershell script. So I opened Powershell ISE in Administrator mode and ran an existing script.

Suddenly, the output pane throws some weird messages in red saying:

File XXXX cannot be loaded because running scripts is disabled on this system. For more
information, see about_Execution_Policies at
+ CategoryInfo : SecurityError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnauthorizedAccess

Don’t panic, there is nothing wrong here.

Mr.Q – The first thing to check for is “are you running your Powershell ISE in Administrator Mode”

Mr.A – Yes


Mr.Q -Now run this command in your output pane: 


If the response is ‘Restricted’ 

The issue is clear… have to change so called ExecutionPolicy

The options to change are:

Set-ExecutionPolicy RemoteSigned

any scripts that you write yourself, but to run scripts downloaded from the Internet only if those scripts have been signed by a trusted publisher.

Alternatively, you can set the execution policy to

  • AllSigned (all scripts, including those you write yourself, must be signed by a trusted publisher)
  • or Unrestricted (all scripts will run, regardless of where they come from and whether or not they’ve been signed).

Filed under: Powershell


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

You may also be interested in...

Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170424.1 | Last Updated 10 Feb 2014
Article Copyright 2014 by Vidyasagar Machupalli
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid