This project is read-only.
5
Vote

Erro on Import module

description

I downloaded the module and added in the Modules folder of my power shell.

Then open the Power Shell and tried to import the module
ipmo : Could not load file or assembly
'file:///{omited}\WindowsPowerShell\Modules\SQLite\bin\CodeOwls.PowerShell.Paths.dll' or one of its
dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
At {omited}\WindowsPowerShell\Modules\SQLite\start-sqlite.psm1:78 char:30
+ ls $PSScriptRoot/bin/*.dll | ipmo;
+                              ~~~~
    + CategoryInfo          : NotSpecified: (:) [Import-Module], FileLoadException
    + FullyQualifiedErrorId : System.IO.FileLoadException,Microsoft.PowerShell.Commands.ImportModuleCommand

ipmo : Could not load file or assembly
'file:///{omited}\WindowsPowerShell\Modules\SQLite\bin\x64\System.Data.SQLite.dll' or one of its
dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
At {omited}\WindowsPowerShell\Modules\SQLite\start-sqlite.psm1:83 char:35
+     ls $PSScriptRoot/bin/x64/*.dll | ipmo;
+                                      ~~~~
    + CategoryInfo          : NotSpecified: (:) [Import-Module], FileLoadException
    + FullyQualifiedErrorId : System.IO.FileLoadException,Microsoft.PowerShell.Commands.ImportModuleCommand

import-module : Could not load file or assembly
'file:///{omited}\WindowsPowerShell\Modules\SQLite\bin\CodeOwls.PowerShell.SQLite.Provider.dll' or
one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
At line:1 char:1
+ import-module SQLite
+ ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Import-Module], FileLoadException
    + FullyQualifiedErrorId : System.IO.FileLoadException,Microsoft.PowerShell.Commands.ImportModuleCommand

comments

omargibran wrote May 15, 2015 at 4:07 PM

I have Windows 8.1 x64

beefarino wrote May 16, 2015 at 9:37 PM

What is the value of your $psversiontable variable? Please list all keys returned.

techfooninja wrote Mar 14, 2016 at 4:56 AM

I'm seeing this as well on Windows 10 (10586). Here's my $psversiontable output:
PS C:\Users\Josh\Downloads\SQLite.1.1.0.0> $psversiontable

Name                           Value
----                           -----
PSVersion                      5.0.10586.122
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.10586.122
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

techfooninja wrote Mar 14, 2016 at 5:15 AM

Nevermind. For me, the problem was resolved when I unblocked all of the files using the Unblock-File cmdlet. After that, it imported without a problem.

heinvandenheuvel wrote Oct 19, 2016 at 4:24 PM

Thanks for this topic! I had the same issue under Windows 7.0
Same lame error messages.


Unblock did not appear to fix it, as error persisted.
All that was needed was fresh process after the unblock and it worked for me.

dir -recurse C:\Windows\System32\WindowsPowerShell\v1.0\Modules\SQLite | unblock-file

Hein