cannot be loaded because running scripts is disabled on this system.

By | May 24, 2014

C:\Users\sibanda\demotedc.ps1 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. At line:1 char:1 + .\demotedc.ps1 + ~~~~~~~~~~~~~~ + CategoryInfo : SecurityError: (:) [], PSSecurityException + FullyQualifiedErrorId : UnauthorizedAccess

=======================

Solution

=======================

Right click of powersell and Run as Administrator

At command prompt execute the following:

Set-ExecutionPolicy Unrestricted -Force