So while I was playing with certificates installation, I was also playing around with my PowerShell DLL and I suddenly started getting this error
[PS] C:\>$cred = New-Object System.Management.Automation.PSCredential $Username, $Password
[PS] C:\>$PSSession = New-PSSession -auth CredSSP -cred $cred -ComputerName ns1 -UseSSL
$PSSession = New-PSSession -auth CredSSP -cred $cred -ComputerName ns1 –UseSSL
$PSSession = New-PSSession -auth CredSSP -cred $cred -ComputerName ns1 –UseSSL
[ns1] Connecting to remote server failed with the following error message : The server certificate on the destination computer (ns1:5986) has the following errors:
The SSL certificate could not be checked for revocation. The server used to check for revocation might be unreachable.
The SSL certificate is signed by an unknown certificate authority. For more information, see the about_Remote_Troubleshooting Help topic.
+ CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:Re moteRunspace) [], PSRemotingTransportException
+ FullyQualifiedErrorId : PSSessionOpenFailed
at first I couldn’t quite understand why. My machine was part of the domain so I started checking if the machines could see/connect to the CA and such, but then I remembered one of the functions I was testing while playing around with certificates was importing the root CA to trusted root certification authorities, and when I checked, it was truly missing. I came across this Blog post that makes a good explanation that others might find useful in case they are using self signed certificates instead of certificates from a CA like me.
Ingen kommentarer:
Send en kommentar