In this PowerShell tutorial, we will discuss how to fix the file is not digitally signed PowerShell script error.
You can follow the solution to fix error cannot be loaded. the file is not digitally signed PowerShell.
Recently, I was trying to execute a PowerShell script using Windows PowerShell ISE.
But I got an error as cannot be loaded. the file is not digitally signed PowerShell.
the file is not digitally signed powershell script
I was getting the error in Windows 10 laptop.
You will receive this error when you will run a PowerShell script that is not signed with a trusted publisher.
In the system, there will be a execution policy, By default, the PowerShell execution policy is set to Allsigned.
You can see the PowerShell execution policy by executing the below command.
Get-ExecutionPolicy
To fix error, you need to run the below PowerShell command.
Set-ExecutionPolicy unrestricted
Once you execute the command, it will ask you to confirm, click on Y like below:
Once you execute the above command, now you will be able to execute the PowerShell script.
Import-module cannot be loaded because running scripts is disabled on this system
Sometimes you may get the error like below:
Import-Module : File C:\Program Files\WindowsPowerShell\Modules\Az.Accounts\1.9.0\Az.Accounts.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.
The error looks like below:
To fix cannot be loaded because running scripts is disabled on this system. for more information error, run the below command:
Set-ExecutionPolicy unrestricted
You may like the following PowerShell tutorials:
- Enable or Disable List Throttling using PowerShell in SharePoint 2013/2016
- SharePoint 2013/2016: Get all List Templates from Site collection using PowerShell
- Get SharePoint List Name and GUID using PowerShell and CSOM
- Delete and restore SharePoint site or subsite using Browser and PowerShell
- SharePoint 2019/2016/2013: Create a web application and a Site Collection using PowerShell
- How to perform IIS backup and restore using PowerShell
I hope this tutorial helps to fix the error the file is not digitally signed powershell script. Also, how to fix error cannot be loaded because running scripts is disabled on this system. for more information in import-module in PowerShell.
- powershell script is not digitally signed
- file cannot be loaded is not digitally signed
- powershell not digitally signed
- powershell script not digitally signed error
- powershell the file is not digitally signed
After working for more than 15 years in Microsoft technologies like SharePoint, Office 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Out audiences are from the United States, Canada, United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a SharePoint MVP(8 times), check out My MVP Profile. I have also worked in companies like HP, TCS, KPIT, etc.