开发者

Error with using PowerShell and COM objects

开发者 https://www.devze.com 2023-01-08 19:30 出处:网络
I\'m trying to work over PowerShell using the CERTENROLLLib and CERTCLIENTLib (COM objects). $com = new-object -ComObject \'CERTCLIENTLib\'

I'm trying to work over PowerShell using the CERTENROLLLib and CERTCLIENTLib (COM objects).

$com = new-object -ComObject 'CERTCLIENTLib'

But i'm getting error: Cannot load COM type CERTCLIENTLib. I think it is an issue with the namespace, but i don't have any idea what to do?

Can anybody help? Thanks in adv开发者_运维知识库ance!


What you have looks like it might be a .NET to COM interop assembly and not a PROGID. If that is the case, you don't need the -ComObject parameter. If it is a .NET interop assembly you need to specify a class to create:

$com = new-object CERTCLIENTLib.CCertRequestClass
0

精彩评论

暂无评论...
验证码 换一张
取 消