Hello
Can someone please help me the following qustion please.
using the above class/type I can get an SSL certificate from one computer and add to the x509 store to another computer like so
cls
$Store=new-object `
System.Security.Cryptography.X509Certificates.X509Store("\\$ComputerName\My","LocalMachine")
$Store.Open("MaxAllowed")
$Cert1=$Store.Certificates | select -First 1
$Store2=new-object `
System.Security.Cryptography.X509Certificates.X509Store("\\$ComputerName2\My","LocalMachine")
$Store2.Open("MaxAllowed")
$Store2.Add($Cert1)
$Store=new-object `
System.Security.Cryptography.X509Certificates.X509Store("\\$ComputerName\My","LocalMachine")
$Store.Open("MaxAllowed")
$Cert1=$Store.Certificates | select -First 1
$Store2=new-object `
System.Security.Cryptography.X509Certificates.X509Store("\\$ComputerName2\My","LocalMachine")
$Store2.Open("MaxAllowed")
$Store2.Add($Cert1)
The object type expected by the ADD method is "X509Certificate2" which is fine in the above case as this was the type of object retrieved in the first step.
My question is if I have a .cer or .pfx file how can I get this into the above format (if possible) ready for adding to the remote X509 store
Thanks All
Ernie