PSPKI
PSPKI copied to clipboard
Get-CertificateTemplate
New-Object : Exception calling ".ctor" with "1" argument(s): "Value was either too large or too small for a UInt32." At C:\PSPKIAudit-main\PSPKI\3.7.2\Server\Get-CertificateTemplate.ps1:67 char:48
- ... ach-Object {New-Object PKI.CertificateTemplates.CertificateTemplate $ ...
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvocationException
- FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand
DEBUG: $error[0].Exception.InnerException.StackTrace at System.ParseNumbers.StringToInt(String s, Int32 radix, Int32 flags, Int32* currPos) at System.Convert.ToInt32(String value, Int32 fromBase) at PKI.CertificateTemplates.CryptographyTemplateSettings.get_keyusages() at PKI.CertificateTemplates.CryptographyTemplateSettings.InitializeDs() at PKI.CertificateTemplates.CertificateTemplateSettings..ctor(IDictionary`2 Entry) at PKI.CertificateTemplates.CertificateTemplate.m_fillproperties(String ldapPath)
Can you find out the problematic template and read raw value from AD?
$ldap = [adsi]"LDAP://$templateDN"
$ldap.Properties["pkikeyusage"]
Closing as stale. No response from OP.