execution of scripts is disabled how do you enable?

power shell modual says execution of scripts cant be loaded its disabled

Answer
Answer

Hi,

This issue usually occurs if you do not run Power shell as an Administrator.

Try the following steps and check if it helps:

a)      Right-click your PowerShell icon and select Run as administrator.

 

b)      Check the current script execution policy by using the Get-ExecutionPolicy cmdlet. To do this, input “Get-ExecutionPolicy” (without quotes) and press Enter on your keyboard. PowerShell will return a value of Restricted.

 

c)       To change the script execution policy, use the Set-ExecutionPolicy cmdlet. Input “Set-ExecutionPolicy unrestricted” (without quotes) and press Enter on your keyboard.

 

d)      To ensure that the script execution policy has been changed, use the Get-ExecutionPolicy cmdlet again. PowerShell should return a value of Unrestricted.

 

e)      You should now be able to run your PowerShell scripts.

 

 

174 people found this reply helpful

·

Was this reply helpful?

Sorry this didn't help.

Great! Thanks for your feedback.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated May 17, 2024 Views 63,236 Applies to: