I get the following error trying to import the ADSYNC module in powershell:
Could not load file or assembly 'file:///C:\Program Files\Microsoft Azure AD Sync\Bin*Microsoft.Azure.ActiveDirectory.Synchronization.ProvisioningWebServiceAdapter.dll*' or one of its dependencies. An attempt was made to load a program with an incorrect format.
I have verified that the above mentioned dll does indeed exist in the specified folder.
I cannot figure out how to update/reload the powershell module. It does not exist in the PSGallery repository. I suppose it was magically loaded when I installed the ADConnect software. I believe I had loaded and worked with the module with no problems at one time.
This is on a Windows 2019 Server VM, release 1809.
Powershell version 5.1.17763.3770
import-module adsync -Verbose
VERBOSE: Loading 'Assembly' from path 'C:\Program Files\Microsoft Azure AD Sync\Bin\ADSync\ClientConfiguration.dll'.
VERBOSE: Loading 'Assembly' from path 'C:\Program Files\Microsoft Azure AD Sync\Bin\ADSync\Microsoft.Azure.ActiveDirectory.ADSyncManagement.Client.dll'.
VERBOSE: Loading 'Assembly' from path 'C:\Program Files\Microsoft Azure AD Sync\Bin\ADSync\Microsoft.Azure.ActiveDirectory.ADSyncManagement.Contract.dll'.
VERBOSE: Loading 'Assembly' from path 'C:\Program Files\Microsoft Azure AD Sync\Bin\ADSync\Microsoft.Online.Coexistence.Provision.dll'.
VERBOSE: Loading 'Assembly' from path 'C:\Program Files\Microsoft Azure AD Sync\Bin\ADSync\Microsoft.Online.Coexistence.Schema.Ex.dll'.
VERBOSE: Loading 'Assembly' from path 'C:\Program Files\Microsoft Azure AD Sync\Bin\ADSync\Microsoft.Online.Coexistence.Security.dll'.
VERBOSE: Loading 'Assembly' from path 'C:\Program Files\Microsoft Azure AD Sync\Bin\ADSync\Microsoft.Online.DirSync.Common.dll'.
VERBOSE: Loading 'Assembly' from path 'C:\Program Files\Microsoft Azure AD Sync\Bin\ADSync\Microsoft.Online.DirSync.ResAgent.dll'.
VERBOSE: Loading 'Assembly' from path 'C:\Program Files\Microsoft Azure AD Sync\Bin\ADSync\Microsoft.Online.DirSync.Resources.dll'.
VERBOSE: Loading 'Assembly' from path 'C:\Program Files\Microsoft Azure AD Sync\Bin\ADSync\UiUtils.dll'.
VERBOSE: Loading 'Assembly' from path 'C:\Program Files\Microsoft Azure AD Sync\Bin\Microsoft.Azure.ActiveDirectory.Synchronization.Framework.dll'.
VERBOSE: Loading 'Assembly' from path 'C:\Program Files\Microsoft Azure AD Sync\Bin\Microsoft.Azure.ActiveDirectory.Synchronization.ProvisioningWebServiceAdapter.dll'.
VERBOSE: Loading 'Assembly' from path 'C:\Program Files\Microsoft Azure AD Sync\Bin\Microsoft.CredentialManagement.OnPremisesPasswordReset.Library.dll'.
VERBOSE: Loading 'Assembly' from path 'C:\Program Files\Microsoft Azure AD Sync\Bin\Microsoft.CredentialManagement.OnPremisesPasswordReset.Shared.dll'.
VERBOSE: Loading 'Assembly' from path 'C:\Program Files\Microsoft Azure AD Sync\Bin\Microsoft.IdentityModel.Clients.ActiveDirectory.dll'.
VERBOSE: Loading 'Assembly' from path 'C:\Program Files\Microsoft Azure AD Sync\Bin\Microsoft.Online.Deployment.Client.Framework.dll'.
VERBOSE: Loading 'Assembly' from path 'C:\Program Files\Microsoft Azure AD Sync\Bin\Microsoft.Online.PasswordSynchronization.dll'.
VERBOSE: Loading 'Assembly' from path 'C:\Program Files\Microsoft Azure AD Sync\Bin\Microsoft.Online.PasswordSynchronization.Rpc.dll'.
VERBOSE: Loading 'Assembly' from path 'C:\Program Files\Microsoft Azure AD Sync\Bin\Microsoft.ServiceBus.dll'.
VERBOSE: Loading 'Assembly' from path 'C:\Program Files\Microsoft Azure AD Sync\Bin\OnPremisesPasswordReset.Security.Cryptography.dll'.
VERBOSE: Loading module from path 'C:\Program Files\Microsoft Azure AD Sync\Bin\adsync\adsync.psd1'.
import-module : Could not load file or assembly 'file:///C:\Program Files\Microsoft Azure AD Sync\Bin\Microsoft.Azure.ActiveDirectory.Synchronization.ProvisioningWebServiceAdapter.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format.