Powershell scripts can be run on any Windows system as long as they are run from the ISE by pushing the green play button. As soon as you want to run it from the cmd or the desktop file you’ll get this error:
script1.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
This error occurs because of a security policy that does not allow scripts to run on your system without your permission. You can do this by opening a PowerShell window with administrative privileges (search for PowerShell on the main menu and select Run as administrator from the context menu) and typing:
set-executionpolicy remotesigned
If the above command does not solve the issue on your system, try this one instead:
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
refer to: