question

AdamB-2326 avatar image
0 Votes"
AdamB-2326 asked Dev073 answered

Azure AD Conect - custom install problem - Specified cast is not valid

Hi,

I'm faced with migfration of Azure AD Connect from one server to another.
I have exported settings on one server, copied to another and during custom install I recieve an error like below:

Invalid Cast Exception
Specified cast is not valid


133510-aad-cast-not-valid.png

AAD Connect version - 1.6.13 - from this version od AD connect settings we're exported and to this version I try to import.

Log entries:
[11:59:14.875] [ 12] [INFO ] SyncEngineSetupViewModel: Validating sync engine settings.
[11:59:14.875] [ 13] [ERROR] A terminating unhandled exception occurred.
[11:59:14.875] [ 12] [INFO ] MigrateSynchronizationPolicy: Loading persisted settings (0).
Exception Data (Raw): System.AggregateException: One or more errors occurred. ---> System.InvalidCastException: Specified cast is not valid.
at Microsoft.Online.Deployment.OneADWizard.UI.Controls.SyncEngine.SyncEngineSetupViewModel.ValidateSettings(Boolean verifyDataDiskSpace)
at Microsoft.Online.Deployment.OneADWizard.UI.WizardPages.InstallSyncEnginePageViewModel.StartNewInstallation(Boolean skipSyncEngineInstall)
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
---> (Inner Exception #0) System.InvalidCastException: Specified cast is not valid.
at Microsoft.Online.Deployment.OneADWizard.UI.Controls.SyncEngine.SyncEngineSetupViewModel.ValidateSettings(Boolean verifyDataDiskSpace)
at Microsoft.Online.Deployment.OneADWizard.UI.WizardPages.InstallSyncEnginePageViewModel.StartNewInstallation(Boolean skipSyncEngineInstall)
at System.Threading.Tasks.Task.Execute()<---


azure-ad-connect
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Dev073 avatar image
0 Votes"
Dev073 answered Dev073 converted comment to answer

Hi Adam,

How are you migrating the AD connect form one server to another. the recommended practice is to put the new server in staging mode and switch over. Its pretty straight forward.

Please refer this article for step-by-step. https://practical365.com/migrating-azure-ad-connect-new-server/

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,

I'd like to have 2nd server with exact same settings.
I exported configuration from 1st using MigrateSettings.ps1 script.
While I try to import settings on new AD connect installation on 2nd server - I recieve above mentioned error.

I believe I could go trough all steps and "clickout" configuration from original server - but it's not error-proof.

Either export or import of settings is "broken" in installer so I believe there is a space for improvement.
Did anyone found similar issue?

0 Votes 0 ·

Hi,

I'am using 1.6.13.
Sadly can't switch to 2.0 branch as I do not have a valid Win 2k16 Srv available at the moment.

0 Votes 0 ·

Yeah, unfortunately it requires an upgrade to solve this issue. Else please try to raise a case with MS for any internal workaround solution available.

0 Votes 0 ·
Dev073 avatar image
0 Votes"
Dev073 answered

HI Adam, what is the version of your new AD connect. is it 2.0.8.0. - looks this installer have some issues with config import .

The same issue was solved in version 2.0.10.0 . Please give a try.

Regards,
Dev

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

its been greatly discussed here. https://community.spiceworks.com/topic/2328493-azure-ad-sync-password-hash-error?source=recommended
Rob from Microsoft (product owner of Azure AD) given a update about this

0 Votes 0 ·