powershell-4.0 - 无法创建 com 对象 - Powershell
问题描述
以下是创建新对象(Powershell)时的消息
我尝试打开 Powershell
- 作为管理员
- 32 位 ISE
- 64 位 ISE
没有任何帮助
> New-Object : Retrieving the COM class factory for component with CLSID
> {00000000-0000-0000-0000-000000000000} failed due to the following
> error: 80040154 Class not registered (Exception from HRESULT:
> 0x80040154 (REGDB_E_CLASSNOTREG)). At line:1 char:8
> + $obj = New-Object -ComObject Microsoft.SMS.Client -Strict
> + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> + CategoryInfo : ResourceUnavailable: (:) [New-Object], COMException
> + FullyQualifiedErrorId : NoCOMClassIdentified,Microsoft.PowerShell.Commands.NewObjectCommand
解决方案
我能够找到替代方法来设置我之前尝试使用 com-object 设置的站点代码并解决问题。但仍然不确定上述方法有什么问题
推荐阅读
- sql - 使用第一个表中的 2 个变量将一个表连接到另一个表并在 Select 中获取 2 个变量
- python-2.7 - python用管道运行shell命令
- javascript - 为什么在 CSV 中输入单词以搜索数据时,搜索框会变得滞后?
- python-3.x - 如何使用 pywinauto 在后台运行 WPF 应用程序
- java - 如何在 Java 中分配数组?
- laravel - 响应内容必须是实现 __toString()、“布尔”的字符串或对象
- c# - 在 LINQ 中使用 Where 删除查询
- reactjs - 尝试在空对象引用上调用虚拟方法 java.lang.String.android.content.Context.getPackageName()
- java - 如何在 Java 项目中导入 Mongo 库
- google-apps-script - 完成谷歌任务后向谷歌电子表格添加一行