Guest Rich Posted February 20, 2009 Posted February 20, 2009 Hi, I am trying to find out if I can use VBScript/WMI to read the information contained within a certificate. Using Scriptomatic, I get the following script, but nothing is returned: On Error Resume Next Const wbemFlagReturnImmediately = &h10 Const wbemFlagForwardOnly = &h20 arrComputers = Array("localhost") For Each strComputer In arrComputers WScript.Echo WScript.Echo "==========================================" WScript.Echo "Computer: " & strComputer WScript.Echo "==========================================" Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\ServiceModel") Set colItems = objWMIService.ExecQuery("SELECT FROM ClientCredentials", "WQL", _ wbemFlagReturnImmediately + wbemFlagForwardOnly) Wscript.Echo "Starting now..." For Each objItem In colItems WScript.Echo "ClientCertificate: " & objItem.ClientCertificate WScript.Echo "HttpDigest: " & objItem.HttpDigest WScript.Echo "IssuedToken: " & objItem.IssuedToken WScript.Echo "Peer: " & objItem.Peer WScript.Echo "ServiceCertificate: " & objItem.ServiceCertificate WScript.Echo "SupportInteractive: " & objItem.SupportInteractive WScript.Echo "Type: " & objItem.Type WScript.Echo "UserName: " & objItem.UserName WScript.Echo "Windows: " & objItem.Windows WScript.Echo Next Next WScript.Echo "Execution is now complete." Can anyone tell me how to accomplish this? Solution need not be limited to WMI. I actually prefer straight VBScript. TIA, Rich Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.