Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks
Imports System Imports System.Security.Cryptography Imports System.Security.Cryptography.X509Certificates Imports System.Text Imports System.IO Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 'Instantiate the Store / The store name is My, location is current user store Dim store As New X509Store("MY", StoreLocation.CurrentUser) 'Open the stor store.Open(OpenFlags.ReadWrite) 'Use the X509CertificateCollection class to get the certificates from the my store into a collection Dim collection As X509Certificate2Collection = CType(store.Certificates, X509Certificate2Collection) 'Declare x509 as the certificate object Dim x509 As New X509Certificate2 'Loop through the certificates in the store, one by one '------------ For Each x509 In collection 'Show the thumbprint for each certificate in the users store MsgBox(x509.Thumbprint) Next x509 store.Close() End Sub End Class
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.