Created
October 29, 2015 19:41
-
-
Save galenemery/b885be98987d2e856dc3 to your computer and use it in GitHub Desktop.
Install Certificate to a certificate store.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%W{ Root CA }.each do |cert_store| | |
powershell_script "import_cert_to_#{cert_store}" do | |
code <<-EOH | |
$certpath = "#{Chef::Config[:file_cache_path]}\\self_cert.cer" | |
$certstore = "cert:\\LocalMachine\\#{cert_store}" | |
Import-Certificate -FilePath $certpath -CertStoreLocation $certstore | |
EOH | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment