Difference between revisions of "Powershell certs"

From UVOO Tech Wiki
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 +
```
 +
$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://social.technet.microsoft.com/Forums/en-US/2eda9d44-aeb3-47cb-942a-cb41306091ba/import-pfx-certificate-on-remote-computers-with-script?forum=winserverpowershell
 +
 +
 
https://superuser.com/questions/889149/export-installed-certificate-and-private-key-from-a-command-line-remotely-in-win
 
https://superuser.com/questions/889149/export-installed-certificate-and-private-key-from-a-command-line-remotely-in-win
  

Latest revision as of 01:44, 28 June 2022