ironmansoftware / powershell-universal

Issue tracker for PowerShell Universal
https://powershelluniversal.com
36 stars 4 forks source link

Get-PSUDashboard causes gRPC error #3932

Open JCrabtree911 opened 3 days ago

JCrabtree911 commented 3 days ago

Version

5.0.12

Severity

Low

Environment

msi

Steps to Reproduce

A call to

Get-PSUDashboard

results in a gRPC error

An error occurred: Status(StatusCode="Internal", Detail="Error starting gRPC call. HttpRequestException: The SSL connection could not be established, see inner exception. AuthenticationException: The remote certificate was rejected by the provided RemoteCertificateValidationCallback.", DebugException="System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.")

Expected behavior

Get-PSUDashboard

# Expected to return a list of Dashboards

Actual behavior

A red error pop will briefly appear with the following text:

An error occurred: Status(StatusCode="Internal", Detail="Error starting gRPC call. HttpRequestException: The SSL connection could not be established, see inner exception. AuthenticationException: The remote certificate was rejected by the provided RemoteCertificateValidationCallback.", DebugException="System.Net.Http.HttpRequestException: The SSL connection could not be established, see inner exception.")

Additional Environment data

Windows Server 2019 Datacenter 1809.

Screenshots/Animations

No response

adamdriscoll commented 3 days ago

This is due to the certificate not being trusted by the cmdlets. You can try this appsetting: https://docs.powershelluniversal.com/config/module#trust-https-certificate

You could also try -TrustCertificate on the cmdlet.

JCrabtree911 commented 3 days ago

It's valid cert signed by a CA whose cert is in the local machine's trusted root certificate store.

adamdriscoll commented 17 hours ago

Interesting. I added some more logging into the certificate validation. You should be able to use the -Verbose parameter on any cmdlets to see a bunch more information about the connection in 5.0.13.