Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bvbeek opened this issue Dec 2, 2021 · 2 comments

Comments

@bvbeek
Copy link

bvbeek commented Dec 2, 2021

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

@bvbeek bvbeek changed the title Error New-AzStorageContext : Cannot find a variable with the name 'AmsiContext'. Import-Module PowerShellGet error: Cannot find a variable with the name 'AmsiContext' Dec 2, 2021
@calumr
Copy link

calumr commented Dec 10, 2021

Seems to be an issue with SentinelOne (virus checker):
https://stackoverflow.com/questions/70172291/powershell-cannot-find-a-variable-with-the-name-amsicontext

@bvbeek
Copy link
Author

bvbeek commented Dec 21, 2021

Yes, that was the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants