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.txtforeach($computer in $computers){Invoke-Command -ComputerName $computer -ScriptBlock {Get-ChildItem cert:\localmachine\my | Format-Table Subject,Thumbprint,notafter -AutoSize}}