Skip to content

Import-Module PowerShellGet error: Cannot find a variable with the name 'AmsiContext' #304

@bvbeek

Description

@bvbeek

Can anyone help me with this issue?

When I execute this command:

Import-Module PowerShellGet

I got this error:

Import-Module : Cannot find a variable with the name 'AmsiContext'.
At line:1 char:1
+ Import-Module PowerShellGet
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (AmsiContext:String) [Import-Module], ItemNotFoundException
    + FullyQualifiedErrorId : VariableNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

The second time it goes fine:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions