/
Austin Certificates - How-To - Request internal certificates via PowerShell

Austin Certificates - How-To - Request internal certificates via PowerShell

Request a computer certificate from the Austin CAs via PowerShell

  1. Sign into a Windows system joined to the Austin Active Directory where the system has permissions to request a certificate from the desired template.

  2. Start an administrative PowerShell session

  3. Run the following commands to define the list for the DNS host names for the certificate request:

    $DnsName = [System.Collections.Generic.List[System.String]]::new()
  4. Modify then run the following commands to define the required DNS host name and subject for the certificate request: 

    $DnsHostName = "hostname.domain"
  5. Run the following commands to define the subject for the certificate request: 

    $Subject = "CN=$DnsHostName"
  6. Run the following commands to add the required DNS host name to the list of DNS host names:

    $DnsName.Add($DnsHostName)
  7. Modify then run the following commands to add any subject alternate names to the certificate request: 

    $DnsName.Add("san1.domain")
  8. Repeat the previous step until all subject alternate names have been added to the certificate request.

  9. Run one of the following commands to define the certificate template:

    • For a Server (10-year duration) certificate:

      $Template = "Server-10year"
    • For a VMware SSL certificate: 

      $Template = "VMwareSSL6.5"
  10. Run the following commands to request the certificate:

    Get-Certificate -Url ldap: -CertStoreLocation "Cert:\LocalMachine\My" -Template $Template -SubjectName $Subject -DnsName $DnsName

Request a user certificate from the Austin CAs via PowerShell

  1. Sign into a Windows system joined to the Austin Active Directory as a user with permissions to request a certificate from the desired template

  2. Start an administrative PowerShell session

  3. Run one of the following commands to define the certificate template:

    • For a Code Signing certificate: 

      $Template = "CodeSigning(Exportable)"
  4. Run the following commands to request the certificate:

    Get-Certificate -Url ldap: -CertStoreLocation "Cert:\CurrentUser\My" -Template $Template