gpt4 book ai didi

Azure AD 同步无法加载文件

转载 作者:行者123 更新时间:2023-12-03 05:01:21 24 4
gpt4 key购买 nike

我遇到了一个非常奇怪的问题。我无法导入 Azure AD 同步模块。这是我尝试过的:

  1. 导入模块 ADSync

  2. 导入模块“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. At line:1 char:1 + Import-module adsync + ~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (:) [Import-Module], BadImageFormatException + FullyQualifiedErrorId : FormatXmlUpdateException,Microsoft.PowerShell.Commands.ImportModuleCommand

我在以下前提下运行:

  1. Azure AD Connect 1.2.70
  2. Powershell 4.0
  3. Windows Server 2012R2

我使用的帐户是域管理员,应该具有完全权限。我正在通过 RDPing 连接到服务器。我还以管理员身份运行 Powershell。我已经检查了所有安装和框架,它们要么是最新的,要么不适用。 AD 同步运行得很好,我只是想让 powershell CMDlet 工作,以便我可以将它们添加到我正在编写的脚本中。

更新:请参阅下面的答案以获取解决方案。重新安装 AAD 是解决方案。

最佳答案

对于遇到此问题的其他人,我发现问题是在运行 (x86) 版本的 powershell 时与 ADSync 模块不兼容。检查用于打开 powershell 的快捷方式。您可以使用命令

[Environment]::Is64BitProcess

检查您是否正在运行 64 位版本的 Powershell。如果返回 false,ADSync 命令将不起作用。

example of 32 bit powershell being incompatible

关于Azure AD 同步无法加载文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56671858/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com