Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

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 advance!

share|improve this question
add comment

1 Answer

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
share|improve this answer
    
Well, it doesn't help. I'm still getting error: make sure the assembly containing this type is loaded. –  abcd123 Jul 22 '10 at 6:52
    
Yeah, you need to use the Add-Type cmdlet on Powershell 2.0. If you're still on 1.0, use [reflection.assembly]::LoadWithPartialName(). However you need to find where the assembly lives (GAC, program files, download folder, etc). –  Keith Hill Jul 22 '10 at 15:07
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.