Version 3.1
When running the following command
get-ca |get-catemplate
I get the following errror:
```
New-Object : Exception calling ".ctor" with "1" argument(s): "There is no such object on the server.
"
At D:\scripts\Modules\pspki\Server\Get-CATemplate.ps1:14 char:4
+ New-Object PKI.CertificateServices.CATemplate -ArgumentList $CA
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvocationException
+ FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand
```
The get-ca command returns my CA with no issues, so I am sure I am passing the right object to get-catemplate.
Comments: Try to run the following code: ``` $CertAdmin = new-object -com certificateauthority.admin $CertAdmin.GetCAProperty("hostname\caname",0x1d,0,4,0) ``` replace 'hostname' with CA's host name and 'caname' with CA name. and send me the output.
When running the following command
get-ca |get-catemplate
I get the following errror:
```
New-Object : Exception calling ".ctor" with "1" argument(s): "There is no such object on the server.
"
At D:\scripts\Modules\pspki\Server\Get-CATemplate.ps1:14 char:4
+ New-Object PKI.CertificateServices.CATemplate -ArgumentList $CA
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvocationException
+ FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand
```
The get-ca command returns my CA with no issues, so I am sure I am passing the right object to get-catemplate.
Comments: Try to run the following code: ``` $CertAdmin = new-object -com certificateauthority.admin $CertAdmin.GetCAProperty("hostname\caname",0x1d,0,4,0) ``` replace 'hostname' with CA's host name and 'caname' with CA name. and send me the output.