We have an application which runs a batch script which installs an OCA and certificates signed by that OCA to a set of Windows machines.
Unfortunately the OCA certificate has expired, and certutil produces errors when we run the script, because the new OCA certificate has the same name as the old one.
How can we use certutil to replace or remove the existing certificate by name before adding the new one?
Please see below for the command I'm using and the result: 'Certificate "x" already in store.' The certificate present in the store with the same name is expired.
The commands are:
certutil -addstore "Root" "file.crt"
certutil -addstore "Ca" "file.crt"
From an elevated command prompt.
