Forum Discussion

Alex Melching's avatar
Alex Melching
Iron Contributor
Aug 17, 2016

PowerShell to Office 365 Broken?

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.

Resources