chaliy/psget — Issue #19: Unsigned Error
Author: ewascent
Created: 2012-02-24 00:37:29+00:00
State: open

I am getting an exception when I try to import PsGet using the RemoteSigned policy. I have to use Unrestricted to run it. I do not usually get modules. Should the author sign them? When I downloaded Posh HG I self signed. It does not really feel like anything is being accomplished if I self sign.

C:\Users\> Set-ExecutionPolicy RemoteSigned
C:\Users\> Import-Module C:\Users\...\Documents\WindowsPowerShell\PsGet\PsGet.psm1

Import-Module : File C:\Users\...\Documents\WindowsPowerShell\PsGet\PsGet.psm1 cannot be loaded. The file C:\Users\...\Documents\WindowsPowerShell\PsGet\PsGet.psm1 is not digitally signed. The script will not execute on the system.
Please see "get-help about_signing" for more details..
At line:1 char:14
+ Import-Module <<<< C:\Users\aldine\Documents\WindowsPowerShell\PsGet\PsGet.psm1
+ CategoryInfo : NotSpecified: (:) [Import-Module], PSSecurityException
+ FullyQualifiedErrorId : RuntimeException,Microsoft.PowerShell.Commands.ImportModuleCommand

C:\Users\> Set-ExecutionPolicy Unrestricted

Execution Policy Change
The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose
you to the security risks described in the about_Execution_Policies help topic. Do you want to change the execution
policy?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"): y
C:\Users\> Import-Module C:\Users\...\Documents\WindowsPowerShell\PsGet\PsGet.psm1

Security Warning
Run only scripts that you trust. While scripts from the Internet can be useful, this script can potentially harm your
computer. Do you want to run C:\Users\...\Documents\WindowsPowerShell\PsGet\PsGet.psm1?
[D] Do not run [R] Run once [S] Suspend [?] Help (default is "D"): r

C:\Users\aldine> Import-Module . \PsGet -?|more

NAME
Import-Module

SYNOPSIS
Adds modules to the current session.