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
精彩评论