List of Script Variables

Hi

Looking for a complete list of scripting variables
I have seen this https://docs.certifytheweb.com/docs/script-hooks.html link.
But I am specifically looking for the DisplayName variable

I couldn’t find anything myself, so I fed the $result variable to a function that recursively printed all of the properties.

I’m going to guess that $_.ManagedItem.Name is what you’re looking for.

$_.Abort
$_.Actions
$_.ChallengeResponsePropagationSeconds
$_.IsSuccess
$_.ManagedItem
$_.Message
$_.Result
$_.ManagedItem.CertificateId
$_.ManagedItem.CertificatePath
$_.ManagedItem.CertificatePreviousThumbprintHash
$_.ManagedItem.CertificateRevoked
$_.ManagedItem.CertificateThumbprintHash
$_.ManagedItem.Comments
$_.ManagedItem.CurrentOrderUri
$_.ManagedItem.DateExpiry
$_.ManagedItem.DateLastRenewalAttempt
$_.ManagedItem.DateRenewed
$_.ManagedItem.DateStart
$_.ManagedItem.Deleted
$_.ManagedItem.DomainOptions
$_.ManagedItem.GroupId
$_.ManagedItem.Health
$_.ManagedItem.Id
$_.ManagedItem.IncludeInAutoRenew
$_.ManagedItem.InstanceId
$_.ManagedItem.IsChanged
$_.ManagedItem.ItemType
$_.ManagedItem.LastRenewalStatus
$_.ManagedItem.Name
$_.ManagedItem.ParentId
$_.ManagedItem.RenewalFailureCount
$_.ManagedItem.RenewalFailureMessage
$_.ManagedItem.RequestConfig
$_.ManagedItem.ServerSiteId
$_.ManagedItem.TargetHost
$_.ManagedItem.DateExpiry
	{.NET DateTime object sub-properties...}
$_.ManagedItem.DateLastRenewalAttempt
	{.NET DateTime object sub-properties...}
$_.ManagedItem.DateRenewed
	{.NET DateTime object sub-properties...}
$_.ManagedItem.DateStart
	{.NET DateTime object sub-properties...}
$_.ManagedItem.DomainOptions.Domain
$_.ManagedItem.DomainOptions.IsChanged
$_.ManagedItem.DomainOptions.IsManualEntry
$_.ManagedItem.DomainOptions.IsPrimaryDomain
$_.ManagedItem.DomainOptions.IsSelected
$_.ManagedItem.DomainOptions.Title
$_.ManagedItem.Health.value__
$_.ManagedItem.ItemType.value__
$_.ManagedItem.LastRenewalStatus.value__
$_.ManagedItem.RequestConfig.AlwaysRecreateBindings
$_.ManagedItem.RequestConfig.BindingIPAddress
$_.ManagedItem.RequestConfig.BindingPort
$_.ManagedItem.RequestConfig.BindingUseSNI
$_.ManagedItem.RequestConfig.Challenges
$_.ManagedItem.RequestConfig.ChallengeType
$_.ManagedItem.RequestConfig.CSRKeyAlg
$_.ManagedItem.RequestConfig.DeploymentBindingBlankHostname
$_.ManagedItem.RequestConfig.DeploymentBindingMatchHostname
$_.ManagedItem.RequestConfig.DeploymentBindingOption
$_.ManagedItem.RequestConfig.DeploymentBindingReplacePrevious
$_.ManagedItem.RequestConfig.DeploymentSiteOption
$_.ManagedItem.RequestConfig.EnableFailureNotifications
$_.ManagedItem.RequestConfig.IsChanged
$_.ManagedItem.RequestConfig.PerformAutoConfig
$_.ManagedItem.RequestConfig.PerformAutomatedCertBinding
$_.ManagedItem.RequestConfig.PerformChallengeFileCopy
$_.ManagedItem.RequestConfig.PerformExtensionlessConfigChecks
$_.ManagedItem.RequestConfig.PerformTlsSniBindingConfigChecks
$_.ManagedItem.RequestConfig.PostRequestPowerShellScript
$_.ManagedItem.RequestConfig.PreRequestPowerShellScript
$_.ManagedItem.RequestConfig.PrimaryDomain
$_.ManagedItem.RequestConfig.SubjectAlternativeNames
$_.ManagedItem.RequestConfig.WebhookContentBody
$_.ManagedItem.RequestConfig.WebhookContentType
$_.ManagedItem.RequestConfig.WebhookMethod
$_.ManagedItem.RequestConfig.WebhookTrigger
$_.ManagedItem.RequestConfig.WebhookUrl
$_.ManagedItem.RequestConfig.WebsiteRootPath
$_.ManagedItem.RequestConfig.Challenges.ChallengeCredentialKey
$_.ManagedItem.RequestConfig.Challenges.ChallengeProvider
$_.ManagedItem.RequestConfig.Challenges.ChallengeRootPath
$_.ManagedItem.RequestConfig.Challenges.ChallengeType
$_.ManagedItem.RequestConfig.Challenges.DomainMatch
$_.ManagedItem.RequestConfig.Challenges.IsChanged
$_.ManagedItem.RequestConfig.Challenges.Parameters
$_.ManagedItem.RequestConfig.Challenges.ZoneId
$_.ManagedItem.RequestConfig.DeploymentBindingOption.value__
$_.ManagedItem.RequestConfig.DeploymentSiteOption.value__
1 Like

Hi, yes you’re correct - we don’t currently have a document for this other than the source code itself: https://github.com/webprofusion/certify/blob/development/src/Certify.Models/Config/ManagedCertificate.cs

This will change somewhat between versions (especially between major version) and but the core information is generally the same.

Thanks
This is what I was looking for.

Just as a note to myself, here is basic example Powershell script which also outputs the result as JSON, this illustrates all of the values available in the result object as well as testing the script runs normally:

param($result)  
$logpath = "c:\temp\ps-test.txt"

$date = Get-Date

Add-Content $logpath ("-------------------------------------------------");
Add-Content $logpath ("Script Run Date: " + $date)
Add-Content $logpath ($result | ConvertTo-Json)