Feb 05 2019 07:25 AM
Anyone see this error when attempting to connect to Exchange Online with MFA?
out-lineoutput : The method or operation is not implemented.
+ CategoryInfo : NotSpecified: (:) [out-lineoutput], NotImplementedException
+ FullyQualifiedErrorId : System.NotImplementedException,Microsoft.PowerShell.Commands.OutLineOutputCommand
Installed the hybrid exchange module from Exchange Online as I have always done. Also installed other AzureAD and seeing the same error (i.e Get-MSOLuser)
The only thing i believe is different this round was that I installed Powershell 5.1 (and even 6.1.2 thinking it might have been a bug). Help
Feb 05 2019 09:18 AM
Works fine here. Do note however that the MFA module does NOT support PowerShell Core yet, use the "old" version (the one built-in in Windows).
Feb 05 2019 09:29 AM
How do I switch to the old version. I am using PS-ISE. Thanks,.
Feb 05 2019 09:37 AM
You shouldn't be using the ISE. When you install the ExO MFA module, it will place a shortcut on your desktop. Use that to launch it, then use the Connect-EXOPSSession cmdlet to connect.
Feb 05 2019 09:47 AM
Always used ISE. Plus I have scripts that do more than just EXO.
Feb 05 2019 10:00 AM
Nobody is stopping you from using those. But the ExO MFA module is not supported in ISE. There are some methods to get it working, if you insist on that approach. It boils down to finding the location where the click-once package was installed and loading the relevant script from there. So something like this:
$targetdir = (dir $env:LOCALAPPDATA"\Apps\2.0\" -Include CreateExoPSSession.ps1,Microsoft.Exchange.Management.ExoPowershellModule.dll -Recurse | Group Directory | ? {$_.Count -eq 2}).Values | sort LastWriteTime -Descending | select -First 1 | select -ExpandProperty FullName
. $targetdir\CreateExoPSSession.ps1
Feb 07 2019 04:10 AM
Hi Jeff,
Try importing the module manually. Run the following commands, delineated by the semicolon:
$Modules = @(Get-ChildItem -Path "$($env:LOCALAPPDATA)\Apps\2.0" -Filter "Microsoft.Exchange.Management.ExoPowershellModule.manifest" -Recurse );
$ModuleName = Join-path $Modules[0].Directory.FullName "Microsoft.Exchange.Management.ExoPowershellModule.dll";
Import-Module -FullyQualifiedName $ModuleName -Force;
$SessionMFEXO = New-ExoPSSession -ConnectionUri 'https://outlook.office365.com/PowerShell-LiveId' -AzureADAuthorizationEndpointUri 'https://login.windows.net/common';
Import-PSSession $SessionMFEXO -AllowClobber;
I've tested with PowerShell ISE Host version 5.1.17134.407, which does work.
Feb 07 2019 05:23 AM
I had the smililar issue and it turned out to be the old version of MSOnline and AzureAD please try use the below make sure to uninstall old AzureAD if you have one installed.
AzureAD V2 module: https://www.powershellgallery.com/packages/AzureAD/2.0.0.131
MSOnline module: https://www.powershellgallery.com/packages/MSOnline/1.1.166.0
Feb 07 2019 06:53 AM
Feb 07 2019 10:10 AM
Sadly none of these have fixed the problem. I can confirm my scripts work with Visual Studio Code. Guess I have to get used to using this instead. Not a bad thing I suppose.
Dec 12 2019 02:47 PM
I'm using something I found online similar to what @Vasil Michev posted earlier. This allows me to establish a MFA enabled EXOPSession from within a script I run via the ISE:
$CreateEXOPSSession = (Get-ChildItem -Path $env:userprofile -Filter CreateExoPSSession.ps1 -Recurse -ErrorAction SilentlyContinue -Force | Select -Last 1).DirectoryName
. "$CreateEXOPSSession\CreateExoPSSession.ps1"
Connect-EXOPSSession -userprincipalname
Hope that helps.
Jun 25 2020 09:12 AM
The level of fragmentation in the tooling of PowerShell is amazing...