timmcmic / DLConversionV2

MIT License
43 stars 9 forks source link

Problem with the enableHybridMailFlow switch #146

Closed jakke91 closed 11 months ago

jakke91 commented 11 months ago

Hello,

I read in the documentation that, when adding the enableHybridMailFlow switch, an Exchange server + credentials should also be stated. So, this is (part of) my command: -enableHybridMailFlow:$TRUE -exchangeServer PigsInSpace.muppets.intra -exchangeCredential $cred.

But then script fails with:

ParameterName Bound ParameterValue


Credentials True System.Management.Automation.PSCredential
Server False
PowershellSessionName True ExchangeOnPremises
connectionURI True https://PigsInSpace.muppets.intra/powershell authenticationType True Basic
configurationName True Microsoft.Exchange
allowRedirection True True
requiresImport True True
isAudit False False
Verbose False
Debug False
ErrorAction False
WarningAction False
InformationAction False
ErrorVariable False
WarningVariable False
InformationVariable False
OutVariable False
OutBuffer False
PipelineVariable False

[7/20/2023 3:06:16 PM] - **** [7/20/2023 3:06:16 PM] - **** [7/20/2023 3:06:16 PM] - BEGIN NEW-POWERSHELLSESSION [7/20/2023 3:06:16 PM] - **** [7/20/2023 3:06:16 PM] - Creating the powershell to server that requires import. [7/20/2023 3:06:16 PM] - The powershell session was created successfully. [7/20/2023 3:06:16 PM] - END NEW-POWERSHELLSESSION [7/20/2023 3:06:16 PM] - **** [7/20/2023 3:06:16 PM] - Calling import-PowerShellSession [7/20/2023 3:06:16 PM] - ERROR: Unable to create powershell session. [7/20/2023 3:06:16 PM] - **** [7/20/2023 3:06:16 PM] - BEGIN disable-allPowerShellSessions [7/20/2023 3:06:16 PM] - **** [7/20/2023 3:06:16 PM] - Gathering all PS Sessions [7/20/2023 3:06:16 PM] - Disconnecting Exchange Online Session [7/20/2023 3:06:16 PM] - Removing other non-Exchange Online powershell sessions. 1 [7/20/2023 3:06:16 PM] - Session1 [7/20/2023 3:06:16 PM] - PigsInSpace.muppets.intra [7/20/2023 3:06:17 PM] - Error disconnecting powershell graph - hard abort since this is called in exit code. [7/20/2023 3:06:17 PM] - IT MAY BE NECESSARY TO EXIT THIS POWERSHELL WINDOW AND REOPEN TO RESTART FROM A FAILED MIGRATION [7/20/2023 3:06:17 PM] - END disable-allPowerShellSessions [7/20/2023 3:06:17 PM] - **** [7/20/2023 3:06:17 PM] - ****

Other Exchange servers gives same result. Basic auth is enabled on Powershell.

When I remove the -enableHybridMailFlow switch, the command/migration works. Any pointers are very welcome.

Cheers, Jakke91

timmcmic commented 11 months ago

If the exchange server name is not a load balanced url using basic authentication authentication please add -ExchageAuthenticationMethod Kerberos

The error is importing the remote shell session.

============================== Timothy J. McMichael Senior Support Escalation Engineer @.**@.> (980)-776-7465

Hours: Sunday – Wednesday 08:00 – 16:00 eastern time zone.

Manager: Tom Roughley @.**@.>)

Premier Support - (800)-936-3100 Broad Commercial Support - (800)-936-4900

==============================


From: jakke91 @.> Sent: Monday, July 24, 2023 4:42 AM To: timmcmic/DLConversionV2 @.> Cc: Subscribed @.***> Subject: [timmcmic/DLConversionV2] Problem with the enableHybridMailFlow switch (Issue #146)

Hello,

I read in the documentation that, when adding the enableHybridMailFlow switch, an Exchange server + credentials should also be stated. So, this is (part of) my command: -enableHybridMailFlow:$TRUE -exchangeServer PigsInSpace.muppets.intra -exchangeCredential $cred.

But then script fails with:

ParameterName Bound ParameterValue


Credentials True System.Management.Automation.PSCredential Server False PowershellSessionName True ExchangeOnPremises connectionURI True https://PigsInSpace.muppets.intra/powershellhttps://pigsinspace.muppets.intra/powershell authenticationType True Basic configurationName True Microsoft.Exchange allowRedirection True True requiresImport True True isAudit False False Verbose False Debug False ErrorAction False WarningAction False InformationAction False ErrorVariable False WarningVariable False InformationVariable False OutVariable False OutBuffer False PipelineVariable False

[7/20/2023 3:06:16 PM] - **** [7/20/2023 3:06:16 PM] - **** [7/20/2023 3:06:16 PM] - BEGIN NEW-POWERSHELLSESSION [7/20/2023 3:06:16 PM] - **** [7/20/2023 3:06:16 PM] - Creating the powershell to server that requires import. [7/20/2023 3:06:16 PM] - The powershell session was created successfully. [7/20/2023 3:06:16 PM] - END NEW-POWERSHELLSESSION [7/20/2023 3:06:16 PM] - **** [7/20/2023 3:06:16 PM] - Calling import-PowerShellSession [7/20/2023 3:06:16 PM] - ERROR: Unable to create powershell session. [7/20/2023 3:06:16 PM] - **** [7/20/2023 3:06:16 PM] - BEGIN disable-allPowerShellSessions [7/20/2023 3:06:16 PM] - **** [7/20/2023 3:06:16 PM] - Gathering all PS Sessions [7/20/2023 3:06:16 PM] - Disconnecting Exchange Online Session [7/20/2023 3:06:16 PM] - Removing other non-Exchange Online powershell sessions. 1 [7/20/2023 3:06:16 PM] - Session1 [7/20/2023 3:06:16 PM] - PigsInSpace.muppets.intra [7/20/2023 3:06:17 PM] - Error disconnecting powershell graph - hard abort since this is called in exit code. [7/20/2023 3:06:17 PM] - IT MAY BE NECESSARY TO EXIT THIS POWERSHELL WINDOW AND REOPEN TO RESTART FROM A FAILED MIGRATION [7/20/2023 3:06:17 PM] - END disable-allPowerShellSessions [7/20/2023 3:06:17 PM] - **** [7/20/2023 3:06:17 PM] - ****

Other Exchange servers gives same result. Basic auth is enabled on Powershell.

When I remove the -enableHybridMailFlow switch, the command/migration works. Any pointers are very welcome.

Cheers, Jakke91

— Reply to this email directly, view it on GitHubhttps://github.com/timmcmic/DLConversionV2/issues/146, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKGTN6NQCKWJH6U5QLPOSR3XRYYOTANCNFSM6AAAAAA2VHWDDY. You are receiving this because you are subscribed to this thread.Message ID: @.***>

jakke91 commented 11 months ago

That worked, cheers!!