0

The command to shows me the thumbprint of my certificate:

Get-ChildItem -Path Cert:\LocalMachine\MY | Where-Object {$_.Subject -Match "MYCERT"} | Select-Object Thumbprint

1.Thumbprint
2.----------
3.6DFD904457E6AFA01E406FD6FC2B34DB4B829672

I would like to output only line 3, how can I filter the output here?

Don Matteo
  • 85
  • 1
  • 8

1 Answers1

2

You can use -ExpandProperty parameter to expand the Thumbprint property.

Get-ChildItem -Path Cert:\LocalMachine\MY | 
            Where-Object {$_.Subject -Match "MYCERT"} | 
            Select-Object Thumbprint -ExpandProperty "Thumbprint"
Abdul Niyas P M
  • 18,035
  • 2
  • 25
  • 46