DLConversionV2 icon indicating copy to clipboard operation
DLConversionV2 copied to clipboard

Error initializing default drive: when running Start-MultipleDistributionListMigration

Open YANSA23 opened this issue 10 months ago • 7 comments

I've been able to migrate single distribution lists(though with an emails address issue, separate), but when I try to migrate multiple at a time, I get: "WARNING: Error initializing default drive: 'Unable to find a default server with Active Directory Web Services running.'."

What I'm running:

$PSDefaultParameterValues['*-AD*:Server']` = 'ServerName.domain.suffix'

$Credentials = get-credential

$groups = get-content c:\POSH\DLs.txt
Start-MultipleDistributionListMigration -groupSMTPAddresses $groups -globalCatalogServer ServerName.domain.suffix -activeDirectoryAuthenticationMethod Kerberos -msGraphTenantID "XXXX" -msGraphCertificateThumbprint "XXXX" -msGraphApplicationID "XXXXX" -exchangeOnlineCertificateThumbPrint "XXXXXXXX" -exchangeOnlineOrganizationName "domain.suffix" -exchangeOnlineAppID "XXXXXXX" -logFolderPath C:\Temp -dnNoSyncOU “OU=DoNotSync,DC=domain,DC=edu” -aadConnectServer azureadc.olin.edu -aadConnectCredential $Credentials -aadConnectAuthenticationMethod Kerberos -exchangeServer exchangesever.domain.suffix -exchangeCredential $Credentials -exchangeAuthenticationMethod Kerberos

To clarify, I have to run "$PSDefaultParameterValues['-AD:Server']` = 'ServerName.domain.suffix'" due to my laptop being AAD joined and not on the local domain, but the Multiple Migration is the only time I've run into an issue so far with it not being recognized.

YANSA23 avatar Apr 11 '24 13:04 YANSA23

So this is probably because the multiple migration leverages jobs. Being honest I've never had anyone do this. So the multiple migration is going to spin up a controller, the controller is then going to provision one job for each machine. I'm not sure what the machine being AAD Joined has to do with specifying the global catalog server as a part of the migration.

Tim

From: YANSA23 @.> Sent: Thursday, April 11, 2024 9:27 AM To: timmcmic/DLConversionV2 @.> Cc: Subscribed @.***> Subject: [timmcmic/DLConversionV2] Error initializing default drive: when running Start-MultipleDistributionListMigration (Issue #164)

I've been able to migrate single distribution lists(though with an emails address issue, separate), but when I try to migrate multiple at a time, I get: "WARNING: Error initializing default drive: 'Unable to find a default server with Active Directory Web Services running.'."

What I'm running:

$PSDefaultParameterValues['-AD:Server']` = 'ServerName.domain.suffix'

$Credentials = get-credential

$groups = get-content c:\POSH\DLs.txt

Start-MultipleDistributionListMigration -groupSMTPAddresses $groups -globalCatalogServer ServerName.domain.suffix -activeDirectoryAuthenticationMethod Kerberos -msGraphTenantID "XXXX" -msGraphCertificateThumbprint "XXXX" -msGraphApplicationID "XXXXX" -exchangeOnlineCertificateThumbPrint "XXXXXXXX" -exchangeOnlineOrganizationName "domain.suffix" -exchangeOnlineAppID "XXXXXXX" -logFolderPath C:\Temp -dnNoSyncOU "OU=DoNotSync,DC=domain,DC=edu" -aadConnectServer azureadc.olin.edu -aadConnectCredential $Credentials -aadConnectAuthenticationMethod Kerberos -exchangeServer exchangesever.domain.suffix -exchangeCredential $Credentials -exchangeAuthenticationMethod Kerberos

To clarify, I have to run "$PSDefaultParameterValues['-AD:Server']` = 'ServerName.domain.suffix'" due to my laptop being AAD joined and not on the local domain, but the Multiple Migration is the only time I've run into an issue so far with it not being recognized.

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

timmcmic avatar Apr 11 '24 14:04 timmcmic

So I would probably be better off by doing it in a foreach loop? Or one a server directly, but not ideal.. I suppose the foreach loop is fine for us being that we're pretty simple, so I'll leave it up to you if this can be closed

YANSA23 avatar Apr 11 '24 14:04 YANSA23

I would not recommend you do this in a for each loop.

Why does running the command and specifying the globalCatlogServer and credentials not work in your situation?

Tim

From: YANSA23 @.> Sent: Thursday, April 11, 2024 10:41 AM To: timmcmic/DLConversionV2 @.> Cc: Tim McMichael @.>; Comment @.> Subject: Re: [timmcmic/DLConversionV2] Error initializing default drive: when running Start-MultipleDistributionListMigration (Issue #164)

So I would probably be better off by doing it in a foreach loop? Or one a server directly, but not ideal.. I suppose the foreach loop is fine for us being that we're pretty simple, so I'll leave it up to you if this can be closed

Reply to this email directly, view it on GitHubhttps://github.com/timmcmic/DLConversionV2/issues/164#issuecomment-2049851889, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKGTN6MIVYBCHFUDBNWVZ6LY42OHJAVCNFSM6AAAAABGCJ47Q2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBZHA2TCOBYHE. You are receiving this because you commented.Message ID: @.@.>>

timmcmic avatar Apr 11 '24 14:04 timmcmic

I'm not sure on the technical reason it doesn't work, I just know that it doesn't. Back when we spun up Intune and worked with an MSP, I put my device on AAD and early on we identified that trying to run anything against the local AD would result in the error about being unable to find a default server.

I suspect this is due to my computer not being on the local domain that the DC is a part of, thus my machine can't naturally find it without me setting it in my PS session. When I stated implementing defining the default server, I've had no issues working with the local AD when creating accounts or running reports

YANSA23 avatar Apr 11 '24 14:04 YANSA23

Well yes - if you try to do any AD management command on a non-domain joined machine expecting discovery to work it will not work.

In this case though - I do not rely on any type of domain discovery but rather you specify the server, credentials, and credential type (Kerberos or basic).

Have you tried running the script as documented without this extra stuff?

Tim

From: YANSA23 @.> Sent: Thursday, April 11, 2024 10:48 AM To: timmcmic/DLConversionV2 @.> Cc: Tim McMichael @.>; Comment @.> Subject: Re: [timmcmic/DLConversionV2] Error initializing default drive: when running Start-MultipleDistributionListMigration (Issue #164)

I'm not sure on the technical reason it doesn't work, I just know that it doesn't. Back when we spun up Intune and worked with an MSP, I put my device on AAD and early on we identified that trying to run anything against the local AD would result in the error about being unable to find a default server.

I suspect this is due to my computer not being on the local domain that the DC is a part of, thus my machine can't naturally find it without me setting it in my PS session. When I stated implementing defining the default server, I've had no issues working with the local AD when creating accounts or running reports

Reply to this email directly, view it on GitHubhttps://github.com/timmcmic/DLConversionV2/issues/164#issuecomment-2049868877, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKGTN6PKJAN35KONVC6YUXDY42PCPAVCNFSM6AAAAABGCJ47Q2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBZHA3DQOBXG4. You are receiving this because you commented.Message ID: @.@.>>

timmcmic avatar Apr 11 '24 14:04 timmcmic

Maybe I'm not following as I'm running it as documented. What is wrong with what is in the initial post here?

The global catalog server is specified (redacted here), it prompts for credentials (which I use a domain admin account on), Kerberos is specified, etc.

YANSA23 avatar Apr 11 '24 14:04 YANSA23

Ok I was confused by the default parameter and missed the specified server in the command - sorry about that.

Can you send me an individual migration log -> dlconversionv2 at service dot Microsoft dot com.

Tim

From: YANSA23 @.> Sent: Thursday, April 11, 2024 10:55 AM To: timmcmic/DLConversionV2 @.> Cc: Tim McMichael @.>; Comment @.> Subject: Re: [timmcmic/DLConversionV2] Error initializing default drive: when running Start-MultipleDistributionListMigration (Issue #164)

Maybe I'm not following as I'm running it as documented. What is wrong with what is in the initial post here?

The global catalog server is specified (redacted here), it prompts for credentials (which I use a domain admin account on), Kerberos is specified, etc.

Reply to this email directly, view it on GitHubhttps://github.com/timmcmic/DLConversionV2/issues/164#issuecomment-2049885075, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AKGTN6JMALJJEPU3ZFBUJXTY42P47AVCNFSM6AAAAABGCJ47Q2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANBZHA4DKMBXGU. You are receiving this because you commented.Message ID: @.@.>>

timmcmic avatar Apr 11 '24 15:04 timmcmic