

Powershell error – Import-Module : File AzureRM.psm1 cannot be loaded because r...
source link: https://sqlwithmanoj.com/2017/06/09/powershell-error-import-module-file-azurerm-psm1-cannot-be-loaded-because-running-scripts-is-disabled-on-this-system/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Powershell error – Import-Module : File AzureRM.psm1 cannot be loaded because running scripts is disabled on this system
After installing the AzureRM module, I tried to import it, but it gave me an error:
Import-Module : File C:\Program Files\WindowsPowerShell\Modules\AzureRM\4.0.2\AzureRM.psm1 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
+ Import-Module AzureRM
+ ~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [Import-Module], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess,Microsoft.PowerShell.Commands.ImportModuleComman
d
This error means that the AzureRM module downloaded from internet must be signed by a trusted publisher before they can be run.
–> Now to fix it you need to change the execution policy by this simple command:
PS c:\> Set-ExecutionPolicy RemoteSigned
If you are on PowerShell Window then it will throw a popup to confirm to change the Execution policy, you can choose “Yes”:
Now try running again the import command, it will run:
PS c:\> Import-Module AzureRM
Related
Leave a Reply Cancel reply
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Recommend
-
9
Working With Azure Automation From The PowerShell AzureRM CLI Back in March, I had the opportunity to link up with Microsoft Cloud Advocate Damian Brady and record an episode of The DevOps Lab. We chatted a little bit ab...
-
9
How to Fix Nodemon (nodemon.ps1) Cannot Be Loaded Because Running Scripts is Disabled on This System. Jun 20 ・1 min read...
-
7
Terraform Provider for Azure (Resource Manager) Version 2.x of the AzureRM Provider requires Terraform 0.12.x and later, but 1.0 is recommended. Usage Example When using the AzureRM Provider with Terrafo...
-
55
cannot import name '_psutil_linux' psutil 是一个第三方包,需要单独安装。起因,我没有使用 ubuntu20 自带的 python3.8 ,而是再安装了一个 python3.9 。pyth...
-
4
How to Install and Import Active Directory PowerShell ModuleInside Out Security Blog » PowerShell » How to Install and Import Active D...
-
66
-
2
-
14
Authentication Plugin ‘***’ Cannot Be Loaded: How MySQL Searches Client-Side Plugins Back to the Blog...
-
6
AVI Controller Deployment on Azure Terraform module This Terraform module creates and configures an AVI (NSX Advanced Load Balancer) Controller on Azure Module Functions The module is meant to be modular and can create a...
-
6
不能导入'compare_ssim'的解决方法当在Python中编写图像处理代码时,可能会遇到ImportError: cannot import name 'compare_ssim'的错误。这个错误通常是由于无法导入compare_ssim函数而引起的。本文将介绍导致此...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK