Jump to content

Recommended Posts

Posted

Anyone come across this before:

 

PS C:\> Import-Module AdmPwd.PS

Import-Module : Could not load file or assembly 'file:///C:\Windows\system32\WindowsPowerShell\v1.0\Modules\AdmPwd.PS\A

dmPwd.PS.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime a

nd cannot be loaded.

At line:1 char:14

+ Import-Module <<<< AdmPwd.PS

+ CategoryInfo : NotSpecified: (:) [import-Module], BadImageFormatException

+ FullyQualifiedErrorId : System.BadImageFormatException,Microsoft.PowerShell.Commands.ImportModuleCommand

 

 

Dont see a solution online for it anywhere?

Posted
Try updating .net framework

 

I have tried this and I am still getting the message when importing modules

 

I am running release 379893 which is .net framework v4.5.2

Posted (edited)
are you running a 32-bit powershell on a 64-bit install

If you try to load the AwdPwd module from 32-bit PowerShell on a 64-bit Windows PC you should receive a slightly different error message.

 

PS C:\Windows\system32> Import-Module AdmPwd.PS
[color="#FF0000"]Import-Module : The specified module 'AdmPwd.PS' was not loaded because no valid module file was found in any module 
directory.
At line:1 char:1
+ Import-Module AdmPwd.PS
+ ~~~~~~~~~~~~~~~~~~~~~~~
   + CategoryInfo          : ResourceUnavailable: (AdmPwd.PS:String) [import-Module], FileNotFoundException
   + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand[/color]

Edited by Arthur
Posted
Which version of PowerShell do you have installed? Enter $PSVersionTable in PowerShell and post the results. :)

 

Name Value

---- -----

CLRVersion 2.0.50727.5485

BuildVersion 6.1.7601.17514

PSVersion 2.0

WSManStackVersion 2.0

PSCompatibleVersions {1.0, 2.0}

SerializationVersion 1.1.0.1

PSRemotingProtocolVersion 2.1

 

 

As above :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...