In this azure tutorial, we will discuss how to fix the error, Import-Module: File C:\Program Files\WindowsPowerShell\Modules\Azure\5.3.0\Azure.psm1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170. Azure.psm1 cannot be loaded because running scripts is disabled on this system.
Which comes while trying to execute the cmdlet to import the Azure module using PowerShell ISE in Azure.
Table of Contents
Running scripts is disabled on this system
Recently, while executing the below cmdlet to import the Azure module, i got the above error.
PS C:\windows\system32> Import-Module Azure

The complete error message is as below
files cannot be loaded because running scripts is disabled
Import-Module: File C:\Program Files\WindowsPowerShell\Modules\Azure\5.3.0\Azure.psm1 cannot be loaded because running scripts is disabled on this system. For more information,
see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:5 char:1
- Import-Module Azure
~~~~~~~- CategoryInfo : SecurityError: (:) [Import-Module], PSSecurityException
- FullyQualifiedErrorId: UnauthorizedAccess, Microsoft.PowerShell.Commands.ImportModuleCommand
Running scripts is disabled on this system [Solved]
To fix the above issue run the below command first.
PS C:\windows\system32> Set-ExecutionPolicy RemoteSigned

After running the above command, try importing the Azure Module using the below cmdlet in your PowerShell window or PowerShell ISE. Now you can able to see it imported the Azure module successfully.
PS C:\windows\system32> Import-Module Azure

You may like the following Azure tutorials:
In this Azure tutorial, we discussed how to fix the error, Azure.psm1 cannot be loaded because running scripts is disabled on this system. I hope it helped you to fix your issue.
I am Bijay, a Microsoft MVP (10 times) having more than 17 years of experience in the software industry. During my IT career, I got a chance to share my expertise in SharePoint and Microsoft Azure, like Azure VM, Azure Active Directory, Azure PowerShell, etc. I hope you will learn from these Azure tutorials. Read more