PowerShell
PowerShell
Transition from Cert.GetValidToDt to Cert.ValidToStr
Provides instructions for replacing deprecated GetValidToDt method calls with ValidToStr.Chilkat PowerShell Downloads
Add-Type -Path "C:\chilkat\ChilkatDotNet47-x64\ChilkatDotNet47.dll"
$cert = New-Object Chilkat.Cert
# ------------------------------------------------------------------------
# The GetValidToDt method is deprecated:
$ckdt1 = $cert.GetValidToDt()
if ($cert.LastMethodSuccess -eq $false) {
$($cert.LastErrorText)
exit
}
# ...
# ...
# ------------------------------------------------------------------------
# Do the equivalent using the ValidToStr property
$ckdt2 = New-Object Chilkat.CkDateTime
$ckdt2.SetFromRfc822($cert.ValidToStr)