Microsoft certificate management via the Pki PowerShell module.
Windows
New in version 2016.11.0.
salt.states.win_pki.
import_cert
(name, cert_format='cer', context='LocalMachine', store='My', exportable=True, password='', saltenv='base')¶Import the certificate file into the given certificate store.
name (str) -- The path of the certificate file to import.
cert_format (str) -- The certificate format. Specify 'cer' for X.509, or 'pfx' for PKCS #12.
context (str) -- The name of the certificate store location context.
store (str) -- The name of the certificate store.
exportable (bool) -- Mark the certificate as exportable. Only applicable to pfx format.
password (str) -- The password of the certificate. Only applicable to pfx format.
saltenv (str) -- The environment the file resides in.
Example of usage with only the required arguments:
site0-cert-imported:
win_pki.import_cert:
- name: salt://win/webserver/certs/site0.cer
Example of usage specifying all available arguments:
site0-cert-imported:
win_pki.import_cert:
- name: salt://win/webserver/certs/site0.pfx
- cert_format: pfx
- context: LocalMachine
- store: My
- exportable: True
- password: TestPassword
- saltenv: base
salt.states.win_pki.
remove_cert
(name, thumbprint, context='LocalMachine', store='My')¶Remove the certificate from the given certificate store.
Example of usage with only the required arguments:
site0-cert-removed:
win_pki.remove_cert:
- thumbprint: 9988776655443322111000AAABBBCCCDDDEEEFFF
Example of usage specifying all available arguments:
site0-cert-removed:
win_pki.remove_cert:
- thumbprint: 9988776655443322111000AAABBBCCCDDDEEEFFF
- context: LocalMachine
- store: My