Aug 17 2016 09:21 AM
When connecting to an Office 365 tenant via PowerShell and running the usual commands to connect, cannot import the session.
PS C:\Users\Alex> Import-PSSession $Session
Import-PSSession : Could not load type 'System.Management.Automation.SecuritySupport' from assembly
'System.Management.Automation, Version=3.0.0.0, Culture=neutral, PublicKeyToken="removed"'.
At line:1 char:1
+ Import-PSSession $Session
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Import-PSSession], TypeLoadException
+ FullyQualifiedErrorId : System.TypeLoadException,Microsoft.PowerShell.Commands.ImportPSSessionCommand
I have tried connecting to multiple Office 365 tenants. I removed the token number.
Aug 17 2016 11:35 AM
Aug 17 2016 12:11 PM
Yes, I only copied the error message from the PS window. I have been using PowerShell for quite some time and just today started experiencing this issue. I have now seen the same error start to pop up on other forums.
Aug 17 2016 12:15 PM
Side note: My Windows 10 did get updated to 14393.82. So I now have PowerShell version 5.1.14393.82. Will check an older machine.
Aug 17 2016 12:21 PM
Confirmed. Previous version of PowerShell 5.1.14393.0 connects fine to Office 365. Something wrong in with new version.
Aug 17 2016 01:20 PM - edited Aug 17 2016 01:21 PM
Sep 07 2016 08:12 AM