Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

powershell to retrieve certificate expiration date from list computers.

$
0
0

Hi, 

we need to retrieve certificate expiration date from a list of computers on personal certificates of certificates(local computer).  when I ran the script below, it always sopped after two results.  Can anyone help on retrieving certificate expiration date from a list of computers on personal certificates of certificates(local computer)?

$computers=get-content c:\temp\pc.txt
foreach($computer in $computers){Invoke-Command -ComputerName $computer  -ScriptBlock {Get-ChildItem cert:\localmachine\my | Format-Table Subject,Thumbprint,notafter -AutoSize}}


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>