Ashish Sen Jaswal
Ashish Sen Jaswal 05.08.2020 20:38 (GMT+3) Certificate Policies extension – all you should know (part 2)

Anything that you can share that is wrong over here in the above script Vadims?

Ashish Sen Jaswal
Ashish Sen Jaswal 05.08.2020 12:46 (GMT+3) Certificate Policies extension – all you should know (part 2)

Hi Vadims,

Just a quick question. I am running the below script to create a dummy issuance policy. It does create the issuance policy with Name and OID but does not show me the CPS Location. Can you help?

$Server = (Get-ADDomainController -Discover -ForceDiscover -Writable).HostName[0]
    Import-Module ActiveDirectory -Verbose:$false
    $ConfigNC = $((Get-ADRootDSE -Server $Server).configurationNamingContext)
    
    $OID = New-TemplateOID -Server $Server -ConfigNC $ConfigNC
    $TemplateOIDPath = "CN=OID,CN=Public Key Services,CN=Services,$ConfigNC"
    $oa = @{
        'DisplayName' = 'Policy6'
        'flags' = [System.Int32]'2'
        'msPKI-OID-CPS' = 'https://www.company.com/policies/smartcardpol.aspx'
        'msPKI-Cert-Template-OID' = '1.3.6.1.4.1.1.1.6'
    }
    New-ADObject -Path $TemplateOIDPath -OtherAttributes $oa -Name $OID.TemplateName -Type 'msPKI-Enterprise-Oid' -Server $Server

Ashish Sen Jaswal
Ashish Sen Jaswal 04.08.2020 18:08 (GMT+3) Certificate Policies extension – all you should know (part 2)

No not a concern at all. No problem will ask in the link provided if required.

Vadims Podāns
Vadims Podāns 04.08.2020 14:33 (GMT+3) Certificate Policies extension – all you should know (part 2)

What do you mean? If you have concerns on PSPKI module, I would suggest to post your questions on GitHub: https://github.com/PKISolutions/PSPKI

Ashish Sen Jaswal
Ashish Sen Jaswal 04.08.2020 14:06 (GMT+3) Certificate Policies extension – all you should know (part 2)

I see Vadims that you have extended the base Microsoft's OID .Net Class. Is it possible to achieve the same using the same base Microsoft's OID .Net Class for both Application and Issuance Policies using PowerShell?