1

When I execute the command at power shell Save-Module -Name ACMESharp -Path <path>

It prompts the error as below:

The 'Save-Module' command was found in the module 'PowerShellGet', but the module could not be loaded.

Then I try to execute Import-Module PowerShellGet turn out that it was the execution policy problems that the status is "restricted" the script.

kyorilys
  • 822
  • 13
  • 27

1 Answers1

2

To check whether is about the execution policy , you could just try to execute the ps command Get-ExecutionPolicy

if is return result show is restricted then you have to change the execution policy to RemoteSigned. PS: hope that it won't cause any security issue. Just In case ,disable it after you done.

To disable the restriction, I just execute the ps Command below.

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

To change /remove the execution policy

Set-ExecutionPolicy Undefined

Or, type:

Set-ExecutionPolicy Undefined -scope LocalMachine

For more information can visit the link below: https://msdn.microsoft.com/powershell/reference/5.1/Microsoft.PowerShell.Core/about/about_Execution_Policies

kyorilys
  • 822
  • 13
  • 27