How to get a security hash algorithm for a certificate using Powershell -


i need list of certificates particular hash algorithm.

first tried retrieving signaturealgorithm follows:

get-childitem -recurse | select thumbprint, subject, signaturealgorithm 

which gave me system.security.cryptography.oid value of signaturealgorithm column

i tried using friendlyname

get-childitem -recurse | select thumbprint, subject, signaturealgorithm.friendlyname 

but above returned blank value signaturealgorithm

how can retrieve readable value of signaturealgorithm? , how select sha1 certificates using powershell?

select-object expecting names properties show (since didn't specify parameter, you're using 1st pos. -property). there no properties called signaturealgorithm.friendlyname.

if use calculated property, can design own property value property friendlyname inside object's signaturealgorithm-property. ex:

get-childitem -recurse | select thumbprint, subject, @{n="signaturealgorithm";e={$_.signaturealgorithm.friendlyname}} 

(n short name (could use l or label) , e short expression)


Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

serialization - Convert Any type in scala to Array[Byte] and back -

SonarQube Plugin for Jenkins does not find SonarQube Scanner executable -