Wednesday, 17 December 2014

PS1 CANNOT BE LOADED BECAUSE RUNNING SCRIPTS IS DISABLED ON THIS SYSTEM

If you get the error below:
File C:\Windows\System32\Users-Last-Logon.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.
    + CategoryInfo          : SecurityError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnauthorizedAccess
You can set the execution policy by typing this into your powershell window as below:

Set-ExecutionPolicy RemoteSigned