I would like to know how to view all certificates under a different user using MMC so that I can save all the certificate details in an excel file. I have all the necessary credentials, username and password, of the other user I want to log in into in MMC but I have trouble executing the code to view the certificate information.
I only know how to view certificate with the current user and to save that information in an csv file. But I don't know how to execute the code using a different MMC credential.
This is what I've tried to view the "Current User" certificate:
# Set-Location Cert
Get-ChildItem –Recurse |
Select subject, issuer, thumbprint, notbefore, notafter |
Export-Csv C:\Temp\temp.csv
Please let me know if you could help me revise the code above by using a different user credential in MMC so I can view that user's certificate.