Powershell certs
Jump to navigation
Jump to search
$session = New-PSSession -ComputerName $computerName Copy-Item -Path $CertPath -ToSession $session -Destination 'c:\windows\temp\test.pfx' Invoke-Command -Session $session -ScriptBlock { Import-PFXCertificate -CertStoreLocation Cert:\LocalMachine\My -FilePath 'c:\windows\temp\test.pfx' -Password $using:CertPass } Remove-PSSession $session
https://lachlanbarclay.net/2022/01/updating-iis-certificates-with-powershell
https://stackoverflow.com/questions/21278492/install-certificate-with-powershell-on-remote-server