【发布时间】:2011-12-22 19:21:53
【问题描述】:
我正在编写一个小型 Web 应用程序,它将在 localhost 上运行一些 powershell 脚本以创建新的 IIS 站点等。我的脚本在 ISE 64 位中运行良好,但是当尝试在 32 位中运行它们时,我得到了像这样的错误:
Get-ChildItem IIS:\Sites
Get-ChildItem : Cannot retrieve the dynamic parameters for the cmdlet. Retrieving the COM class factory for component with CLSID {688EEEE5-6A7E-422F-B2E1-6AF00DC944A6} failed due to the following error: 80040154.
我已尝试下载该管理单元的 x86 版本,但安装程序停止告诉我使用“程序和功能”来安装它,我已尝试过但找不到应该启用的功能。
这是一个问题,因为 .NET 应用程序似乎在 32 位 powershell 中运行脚本,所以我的 2 个问题是:
- 我可以从 .NET 以 64 位运行这些脚本吗
- 我可以在 64 位操作系统上以 32 位安装这些管理单元吗
【问题讨论】:
-
虽然项目暂时搁置,但遗憾的是仍未找到解决方案
-
根据 Windows 服务器操作系统,WebAdministration 模块/snapin 可能不存在。见related SO post。
标签: c# .net powershell 32bit-64bit