Using Nitro API, I am trying to generate a CSR request with Subject Alternative Names (SAN). I have tried several things, but in the end, I am still getting a certificate with no SANs. Below is where I am currently at.
https://developer-docs.citrix.com/projects/netscaler-nitro-api/en/12.0/configuration/ssl/sslcertreq/
$csrPayload = @{
reqfile = $certREQFileName
keyfile = $certKEYFileName
commonname = $commonName
organizationname = $organization
organizationunitname = $organizationalUnit
countryname = $country
statename = $state
localityname = $location
digestmethod = 'SHA256'
subjectaltname = @{'DNS.1' = $commonName; 'DNS.2' = $alt2; 'DNS.3' = $alt3}
}
$hashtablePayload.'params' = @{'warning' = 'NO'; 'onerror' = 'EXIT';}
$hashtablePayload.sslcertreq = $csrPayload
$jsonPayload = ConvertTo-Json -InputObject $hashtablePayload -Depth 100