开发者

Error with using PowerShell and COM objects

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜