Sample code for 30+ languages & platforms
PowerShell

Example: Http.GetServerCert method

Demonstrates how to call the GetServerCert method.

Chilkat PowerShell Downloads

PowerShell
Add-Type -Path "C:\chilkat\ChilkatDotNet47-x64\ChilkatDotNet47.dll"

$success = $false

$http = New-Object Chilkat.Http
$cert = New-Object Chilkat.Cert

$success = $http.GetServerCert("chilkatsoft.com",443,$cert)
if ($success -eq $false) {
    $($http.LastErrorText)
    exit
}

$($cert.SubjectDN)
$($cert.ValidToStr)

# Output:

# CN=*.chilkatsoft.com
# Wed, 10 Jun 2026 23:59:59 GMT