0

我正在尝试使用 Thinapp 5.2 打包 SCOM Console 2016。客户也想使用 SCOM 的 PowerShell 部分。但是每当我启动 SCOM Shell 时,它都会给我一堆错误,告诉我它找不到某些 .dll 文件等等。

我之前已经尝试在 VM 上安装它,但它给了我相同的错误消息,所以 Thinapp 不会导致错误。

有谁知道我应该在哪里看?

Import-Module : Cannot load Windows PowerShell snap-in C:\Program Files (x86)\System Center Operations Manager 2016\Powershell\OperationsManager\OM10.CoreCommands\Microsoft.EnterpriseManagement.Core.Cmdlets.dll because of the following error: Unable to load one or more of the requested types.  Retrieve the LoaderExceptions property for more information.

Loader Exceptions:
Could not load file or assembly Microsoft.EnterpriseManagement.Core, Version=7.0.5000.
, Culture=neutral, PublicKeyToken=31bf3856ad364e35 or one of its dependencies.
The system cannot find the file specified.

At C:\Program Files (x86)\System Center Operations Manager 2016\Powershell\OperationsManager\OperationsManager.psm1:1261 char:14
    + Import-Module <<<<  $psScriptRoot\OM10.CoreCommands\OM10.CoreCommands.psd1
    + CategoryInfo          : ResourceUnavailable: (:) [Import-Module], PSSnapInException
    + FullyQualifiedErrorId : PSSnapInLoadFailure,Microsoft.PowerShell.Commands.ImportModuleCommand
	
Import-Module : Could not load file or assembly file:///C:\Program Files (x86)\Systemcenter Operations Manager 2016\Powershell\OperationsManager\OM10.Commands\Microsoft.SystemCenter.OperationsManagerV10.Commands.dll or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded
At C:\Program Files (x86)\System Center Operations Manager 2016\Powershell\OperationsManager\OperationsManager.psm1:1262 char:14
    + Import-Module <<<<  $psScriptRoot\OM10.Commands\OM10.Commands.psd1
    + CategoryInfo          : NotSpecified: (:) [Import-Module], BadImageFormatException
    + FullyQualifiedErrorId : System.BadImageFormatException,Microsoft.PowerShell.Commands.ImportModuleCommand

Add-Type : Could not load file or assembly file:///C:\Program Files (x86)\System Center Operations Manager 2016\Console\Microsoft.Mom.Common.dll or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded
At C:\Program Files (x86)\System Center Operations Manager 2016\Powershell\OperationsManager\OperationsManager.psm1:1311 char:15
    + Add-Type <<<<  -Path $consoleMomCommon
    + CategoryInfo          : NotSpecified: (:) [Add-Type], BadImageFormatException
    + FullyQualifiedErrorId : System.BadImageFormatException,Microsoft.PowerShell.Commands.AddTypeCommand

4

1 回答 1

0

问题解决了,原来我们使用的是旧版本的 Windows Management Framework。更新到 5.1 版后,所有错误都消失了。我安装了这个更新:KB3191566

于 2017-12-20T11:08:55.403 回答