I'm attempting to create a ps script to import .pfx certificates into the CurrentUser store. The script will be executed at logon by about 30 individuals. Each user has a specific folder path where their certificate is stored, but the certificate names don't match their logon id. I'm trying to use a wild card in the -FilePath statement to locate the file, but I keep getting a message that the file can't be found; Import-PfxCertificate : The PFX file could not be found.
Is there a way (better way) to select a .pfx file using wild card notation? Thank you;
Hi Jon, thanks for the reply. I couldn't get your code to work but i was able to get the below to work. Where each user will have a folder with their logon id name and a .pfx cert also by their logon id.