Connect-MsolService : Method not found: 'Void System.Runtime.InteropServices.Marshal.PtrToStructure(IntPtr, !!0)'

  • 7019336
  • 05-Jul-2016
  • 07-Aug-2017

Environment


Migration Toolkit 2.1

Situation


The MTK is unable to connect to O365 through PowerShell, specifically the msolservice.

Using the Migration Toolkit you see the following error:

          Connect-MsolService : Method not found: 'Void System.Runtime.InteropServices.Marshal.PtrToStructure(IntPtr, !!0)'

Resolution

Upgrade .net to 4.5.2 or newer

Additional Information

This article was originally published in the GWAVA knowledgebase as article ID 2821.

Feedback service temporarily unavailable. For content questions or problems, please contact Support.