How Do You Get PowerShell to Run Scripts?

Problem scenario
One of the following apply to you.

Problem scenario #1
You try a PowerShell command but you get an error like this "The 'Login-AzureRmAccount' command was found in the module 'AzureRM.profile', but the module could not be loaded."

OR

Problem scenario #2
You try a PowerShell command but you get an error like this:

Files\WindowsPowerShell\Modules\AzureRM.profile\5.8.2\AzureRM.Profile.psm1 cannot be
loaded because running scripts is disabled on this system.

What should you do?

Solution
Warning: This makes your Windows computer less secure. But it will allow you to run PowerShell scripts.

Procedures

  1. Open PowerShell as administrator.
  2. Run this command: set-executionpolicy remotesigned

Leave a comment

Your email address will not be published. Required fields are marked *