Closed Arne-RFA closed 1 month ago
Change the -exchangeAuthenticationMethod "Kerberos"
You've specified a single server name and it's defaulting to basic auth. I'll go back and look I thought I made this Kerberos already.
Tim
From: Arne-RFA @.> Sent: Tuesday, June 4, 2024 11:22 AM To: timmcmic/DLConversionV2 @.> Cc: Subscribed @.***> Subject: [timmcmic/DLConversionV2] error with "start-collectOnPremSendAs" (Issue #174)
Running from W11 Pro 23H2, AD joined.
PowerShell Version
Name Value
PSVersion 5.1.22621.2506
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.22621.2506
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
After having much fun with modules, this seems to work to have the correct set installed and imported.
Uninstall-Module Microsoft.Graph -AllVersions
Get-InstalledModule Microsoft.Graph.* | ? Name -ne "Microsoft.Graph.Authentication" | Uninstall-Module -AllVersions
Uninstall-Module Microsoft.Graph.Authentication -AllVersions
Uninstall-Module -Name ExchangeOnlineManagement
Install-Module -Name Microsoft.Graph.Authentication -RequiredVersion 2.9.1
Install-Module -Name DLConversionV2
Import-module DLConversionV2
With some mild obsfuscation and removal of the cert based auth parts to set variables
$adCred = import-cliXML "C:\TEMPDIR\DLMigrate\credentials\adCred.XML"
$exchangeOnPremCred = import-cliXML "C:\TEMPDIR\DLMigrate\credentials\adCred.XML"
$globalCatalogServer = "US-DCFILE01.nyc.clientdomain.com"
$aadConnectServer = "us-aadc.nyc.clientdomain.com"
$exchangeServer = "US-EXCH02.nyc.clientdomain.com"
$msGraphTenantID="
$msGraphCertificateThumbprint="
$msGraphApplicationID="
$exchangeOnlineCertificateThumbPrint="
$exchangeOnlineOrganizationName="
$exchangeOnlineAppID="
$enableHybridMailFlow = $TRUE
$logFolderPath = "C:\TEMPDIR\DLMigrate\DLMigrations"
$dnNoSyncOU = "OU=DL-Migrate-NoSync,DC=nyc,DC=clientdomain,DC=com"
$groupSMTPAddress = @.**@.>"
When I run the below
start-collectOnPremSendAs -logFolderPath $logFolderPath -exchangeServer $exchangeServer -exchangeCredential $exchangeOnPremCred
It errors out with
[6/4/2024 10:58:45 AM] - ================================================================================
[6/4/2024 10:58:45 AM] - START LOG FILE
[6/4/2024 10:58:45 AM] - ================================================================================
[6/4/2024 10:58:45 AM] - ****
ParameterName Bound ParameterValue
logFolderPath True C:\TEMPDIR\DLMigrate\DLMigrations
exchangeServer True US-EXCH02.nyc.clientdomain.com
exchangeCredential True System.Management.Automation.PSCredential
exchangeAuthenticationMethod False Basic
retryCollection False False
bringMyOwnRecipients False
Verbose False
Debug False
ErrorAction False
WarningAction False
InformationAction False
ErrorVariable False
WarningVariable False
InformationVariable False
OutVariable False
OutBuffer False
PipelineVariable False
[6/4/2024 10:58:45 AM] - ****
[6/4/2024 10:58:45 AM] - Calling New-PowerShellSession
[6/4/2024 10:58:45 AM] - ****
ParameterName Bound ParameterValue
Credentials True System.Management.Automation.PSCredential
Server False
PowershellSessionName True ExchangePowershell
connectionURI True https://US-EXCH02.nyc.clientdomain.com/powershellhttps://us-exch02.nyc.clientdomain.com/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
[6/4/2024 10:58:45 AM] - ****
[6/4/2024 10:58:45 AM] - ****
[6/4/2024 10:58:45 AM] - BEGIN NEW-POWERSHELLSESSION
[6/4/2024 10:58:45 AM] - ****
[6/4/2024 10:58:45 AM] - Creating the powershell to server that requires import.
[6/4/2024 10:58:45 AM] - The powershell session was created successfully.
[6/4/2024 10:58:45 AM] - END NEW-POWERSHELLSESSION
[6/4/2024 10:58:45 AM] - ****
[6/4/2024 10:58:45 AM] - Attempting to import powershell session.
[6/4/2024 10:58:45 AM] - Unable to import powershell session.
Import-PowershellSession : Cannot bind argument to parameter 'PowershellSession' because it is null.
At C:\Program Files\WindowsPowerShell\Modules\DLConversionV2\2.9.8.36\start-collectOnPremSendAs.ps1:157 char:57
... import-powershellsession -powershellsession $sessionToImport -isAudi ...
+ CategoryInfo : InvalidData: (:) [Import-PowershellSession], ParameterBindingValidationException
+ FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,Import-PowershellSession
[6/4/2024 10:58:45 AM] - ****
[6/4/2024 10:58:45 AM] - BEGIN disable-allPowerShellSessions
[6/4/2024 10:58:45 AM] - ****
[6/4/2024 10:58:45 AM] - Determining if the temporary DL should be cleaned up.
[6/4/2024 10:58:45 AM] - Skip temporary DL removal.
[6/4/2024 10:58:45 AM] - Determining if the original DL should be moved back to the original OU due to failure.
[6/4/2024 10:58:45 AM] - Skip moving original DL to original OU.
[6/4/2024 10:58:45 AM] - Gathering all PS Sessions
[6/4/2024 10:58:45 AM] - Disconnecting Exchange Online Session
[6/4/2024 10:58:45 AM] - Error disconnecting powershell graph - hard abort since this is called in exit code.
[6/4/2024 10:58:45 AM] - IT MAY BE NECESSARY TO EXIT THIS POWERSHELL WINDOW AND REOPEN TO RESTART FROM A FAILED MIGRATION
[6/4/2024 10:58:45 AM] - END disable-allPowerShellSessions
[6/4/2024 10:58:45 AM] - ****
I can provide the un-obfuscated parts, but not in a github issue (-:
I hope to have some test DL created soon.
- Reply to this email directly, view it on GitHubhttps://github.com/timmcmic/DLConversionV2/issues/174, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKGTN6PM4WECYCGH7YF4VBTZFXLP3AVCNFSM6AAAAABIYX7IJ2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGMZTGOBQG4ZDQOI. You are receiving this because you are subscribed to this thread.Message ID: @.**@.>>
thanks for the insanely fast response!
I added "-exchangeAuthenticationMethod kerberos" and it is now progressing!
It has been an interesting voyage through the multitude of blog posts, but I am slowly getting my head around it.
still trying to work out how to do the migration in a forest where there are DL in child domains and members across child domains, but that will be for tomorrow (-:
Just specify a global catalog server in the domain where the DL resides - the script handles the rest. You'll need enterprise admin rights in this instance.
From: Arne-RFA @.> Sent: Tuesday, June 4, 2024 12:32 PM To: timmcmic/DLConversionV2 @.> Cc: Tim McMichael @.>; Comment @.> Subject: Re: [timmcmic/DLConversionV2] error with "start-collectOnPremSendAs" (Issue #174)
thanks for the insanely fast response!
I added "-exchangeAuthenticationMethod kerberos" and it is now progressing!
It has been an interesting voyage through the multitude of blog posts, but I am slowly getting my head around it.
still trying to work out how to do the migration in a forest where there are DL in child domains and members across child domains, but that will be for tomorrow (-:
- Reply to this email directly, view it on GitHubhttps://github.com/timmcmic/DLConversionV2/issues/174#issuecomment-2147954904, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKGTN6PSBD3X6Y3DKPXVEDTZFXTYXAVCNFSM6AAAAABIYX7IJ2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBXHE2TIOJQGQ. You are receiving this because you commented.Message ID: @.**@.>>
GC worked (-:
Running from W11 Pro 23H2, AD joined.
PowerShell Version
After having much fun with modules, this seems to work to have the correct set installed and imported.
With some mild obsfuscation and removal of the cert based auth parts to set variables
When I run the below
It errors out with
I can provide the un-obfuscated parts, but not in a github issue (-:
I hope to have some test DL created soon.