Closed kanu2k21 closed 2 years ago
So after I ran "Connect-ExchangeOnline -UserPrincipalName admin@domain.com" and then ran the start-distributionListMigration command, it worked and connected to EXO successfully in the same PoserShell ISE session.
Now the issue is with https connection with on-prem exchange, I get the error
The SSL certificate contains a common name (CN) that does not match the hostname.
is it possible to not connect using https and just connect with http. the on-prem exchange needs an overhaul from the mess the last admin had created.
Hi! Thanks for posting.
First - it should not be necessary to run connect-ExchangeOnline prior to starting the script. Usually when you do not see the error is a .net error - it means that you specified a wrong user name and password or something was wrong with underlying connectivity. The restart applies to the .net error.
Second - here's what I'd recommend. I'm assuming that you have access to Outlook web access. For example https://webmail.domain.com/owa. I would go to one of the machines that is the webmail endpoint and make sure you follow the guidance to enable basic auth powershell. See the blog posts in the readme. On the migration workstation - create a host file entry webmail.domain.com to the IP of that one host. Then you should be able to use webmail.domain.com as the exchange server name.
Keep in mind an exchange server is not necessary. It's only required to use the enable hybrid mail flow feature. If on premises applications do not require the ability to email the DL post migration - you can not specify an exchange server.
Thank for the response. Ya still the connection to EXO does work if I don't run the Connect-ExchangeOnline prior to starting the script. But I'm ok with this as long as I can connect to it.
Second - yup fixed this by enabling basic auth for PS. it connects properly now.
Now the issue is that its stuck/looping with the below portion in the script.
[2021-10-21 12:08:05 PM] - ********************************************************************************
[2021-10-21 12:08:05 PM] - BEGIN Get-ADObjectConfiguration
[2021-10-21 12:08:05 PM] - ********************************************************************************
[2021-10-21 12:08:05 PM] - GroupSMTPAddress = MigrateTestgrp@domain.com
[2021-10-21 12:08:05 PM] - GlobalCatalogServer = DC.domain1.local:3268
[2021-10-21 12:08:05 PM] - Parameter Set:
[2021-10-21 12:08:05 PM] - *
[2021-10-21 12:08:05 PM] - Credential user name = admin@domain.com
[2021-10-21 12:08:05 PM] - Using AD / LDAP provider to get original DL configuration
[2021-10-21 12:08:05 PM] - Searching by mail address MigrateTestgrp@domain.com
[2021-10-21 12:08:05 PM] - Imported Address Length: 25
[2021-10-21 12:08:05 PM] - Spaces Removed Address Length: 25
The group cannot be found in Active Directory by email address.
[2021-10-21 12:08:05 PM] - Unable to obtain the dynamic group - retrying...
start-sleepProgress : A parameter cannot be found that matches parameter name 'string'.
At C:\Program Files\WindowsPowerShell\Modules\DLConversionV2\2.4.9.3\DLConversionV2.psm1:5477 char:41
+ start-sleepProgress -string "Unable to obtain the ...
+ ~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [start-sleepProgress], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,start-sleepProgress
It has however renamed the on-prem DL with an ! at the end, created an Contact too. and In O365 it has also recreated a cloud only DL with all the members and settings it seems. Now its trying to find the group again in AD with the same email address? I believe it wont find as the email address is changed now to MigrateTestgrp!@domain.com. I do see the ExtensionAttribute2 to have MigrateTestgrp@domain.com stamped but now sure how your script is trying to find it. Do let me know if I am again missing something.
Can you attach the entire log so I can see how you got here? You may also email it timmcmic at Microsoft dot com
From: kanu2k21 @.> Sent: Thursday, October 21, 2021 12:33 PM To: timmcmic/DLConversionV2 @.> Cc: Tim McMichael @.>; Comment @.> Subject: Re: [timmcmic/DLConversionV2] Still New-ExoPSSession : One or more errors occurred. (Issue #29)
Thank for the response. Ya still the connection to EXO does work if I don't run the Connect-ExchangeOnline prior to starting the script. But I'm ok with this as long as I can connect to it.
Second - yup fixed this by enabling basic auth for PS. it connects properly now.
Now the issue is that its stuck/looping with the below portion in the script.
[2021-10-21 12:08:05 PM] - **** [2021-10-21 12:08:05 PM] - BEGIN Get-ADObjectConfiguration [2021-10-21 12:08:05 PM] - **** [2021-10-21 12:08:05 PM] - GroupSMTPAddress = @. [2021-10-21 12:08:05 PM] - GlobalCatalogServer = DC.domain1.local:3268 [2021-10-21 12:08:05 PM] - Parameter Set: [2021-10-21 12:08:05 PM] - [2021-10-21 12:08:05 PM] - Credential user name = **@. [2021-10-21 12:08:05 PM] - Using AD / LDAP provider to get original DL configuration [2021-10-21 12:08:05 PM] - Searching by mail address @. [2021-10-21 12:08:05 PM] - Imported Address Length: 25 [2021-10-21 12:08:05 PM] - Spaces Removed Address Length: 25 The group cannot be found in Active Directory by email address. [2021-10-21 12:08:05 PM] - Unable to obtain the dynamic group - retrying... start-sleepProgress : A parameter cannot be found that matches parameter name 'string'. At C:\Program Files\WindowsPowerShell\Modules\DLConversionV2\2.4.9.3\DLConversionV2.psm1:5477 char:41
+ CategoryInfo : InvalidArgument: (:) [start-sleepProgress], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,start-sleepProgress
It has however renamed the on-prem DL with an ! at the end, created an Contact too. and In O365 it has also recreated a cloud only DL with all the members and settings it seems. Now its trying to find the group again in AD with the same email address? I believe it wont find as the email address is changed now to @. I do see the ExtensionAttribute2 to have @*.**@*.***> stamped but now sure how your script is trying to find it. Do let me know if I am again missing something.
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftimmcmic%2FDLConversionV2%2Fissues%2F29%23issuecomment-948784043&data=04%7C01%7Ctimmcmic%40microsoft.com%7C12179a18891b43f8221208d994b07bd6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637704307999526681%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=vZ%2BWkokyixtxa5oSWWCRJA2RFVI35xj5jJLX5Yx0F%2B0%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAKGTN6IJW572FN6GO2FYG2LUIA6EZANCNFSM5GNCMVRQ&data=04%7C01%7Ctimmcmic%40microsoft.com%7C12179a18891b43f8221208d994b07bd6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637704307999536669%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=86B2g5m3nLm3vRIp0T%2FF96I4xTsFVJCDagIROY7ogSY%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7Ctimmcmic%40microsoft.com%7C12179a18891b43f8221208d994b07bd6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637704307999546666%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=omKJNOIOuGIPMMukEvFxDX15AvIGkFGHItxdOJFOKP0%3D&reserved=0 or Androidhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7Ctimmcmic%40microsoft.com%7C12179a18891b43f8221208d994b07bd6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637704307999546666%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=up%2BzxuubIFTj3j50GU%2BxdrVp772rBtVM0h2qp%2FtxIoE%3D&reserved=0.
Sure I'll send you the logs too. But I do see some errors before this. I believe it was unable to create the Dynamic Distribution Group.
A parameter cannot be found that matches parameter name 'domainController'.
At C:\Users\admin\AppData\Local\Temp\tmp_qucivhr1.xbh\tmp_qucivhr1.xbh.psm1:86126 char:9
+ $steppablePipeline.End()
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Update-Recipient], ParameterBindingException
+ FullyQualifiedErrorId : NamedParameterNotFound,Update-Recipient
[2021-10-20 11:06:58 PM] - ExchangeOnlineCredentialsUserName = user@domain.com [2021-10-20 11:06:58 PM] - Is certificate auth = False [2021-10-20 11:06:58 PM] - ExchangeOnlineCommandPrefix = O365 [2021-10-20 11:06:58 PM] - Creating the exchange online powershell session. New-ExoPSSession : One or more errors occurred. At C:\Program Files\WindowsPowerShell\Modules\ExchangeOnlineManagement\2.0.5\netFramework\ExchangeOnlineManagement.psm1:475 char:30
Saw a similar issue reported. I did restart but still cannot connect. I also cannot connect with Connect-ExchangeOnline -Credential $cloudCred -prefix O365 -LogDirectoryPath "c:\scripts" -LogLevel All But "Connect-ExchangeOnline -UserPrincipalName admin@domain.com" works..
Am I doing something wrong? is it something to do with MFA enabled for my Admin account? Modules are up to date: Script 2.4.9.3 DLConversionV2
Script 2.0.5 ExchangeOnlineManagement
apologies for being a noob...