I want to import a .pfx device certificate to Personal\Certificate location as a local machine. Next, I want to make sure that I do not want to expose this certificate for compromise. Currently, I am copying this to the location machine and pointing it to that location to import but it is not working with the command I use
certutil.exe -f -p password -importfx c:\temp\cert.pfx NoExport
I have packaged this as Intune Apps to push it through Intune. It fails. One other stuff is that I am using the registry check to see it is there. What I am seeing is, that I am not able to delete the registry entry when I initially installed this cert and am not sure why it would not allow me to delete it. So, I am checking if it exists then do not install and if not install. Unfortunately, since it exists from the prior install, I am not able to install.
2 things I need here
- How to delete the cert registry value
- Is there a way I can use Powershell script to do this or me running this as a CMD file is good and packing it in Intune should do.
Currently, I have packaged it as cmd file.