1

I am getting the below error while SSH'ing into a windows server - 2008 R2 SP1 and issuing the command - "Import-Module MSOnline"

Import-Module : Could not load file or assembly 'file:///C:\Windows\system32\WindowsPowerShell\v1.0\Modules\MSOnline\Microsoft.Online.Administration.Automation.PSModul e.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. At line:1 char:14 + Import-Module <<<< MSOnline; + CategoryInfo : InvalidOperation: (:) [Import-Module], BadImageFormatException + FullyQualifiedErrorId : FormatXmlUpateException,Microsoft.PowerShell.Commands.ImportModuleCommand

The import module command works fine, while issuing it directly through the Powershell console in the Windows Server.

We have .net 4.7.2, WMF 5.1 and MSOnline module 1.0.9031.1 installed in the server.

Can someone please assist to get this fixed.

LocoGris
  • 4,432
  • 3
  • 15
  • 30
Jesvin
  • 11
  • 4
  • Please refer to this blog if this helps to resolve your issue https://blogs.technet.microsoft.com/rmilne/2016/05/18/azure-ad-module-this-assembly-is-built-by-a-runtime-newer-than-the-currently-loaded-runtime-and-cannot-be-loaded/ – SaurabhSharma Jan 29 '19 at 01:33

0 Answers0