The following works locally
Get-CertificateTemplate -Name $template | Get-CertificateTemplateAcl | Add-CertificateTemplateAcl -User $user -AccessType Allow -AccessMask $fullControl | Set-CertificateTemplateAcl
But if I ran it from a PowerShell remote session, I got error:
Specified method is not supported.
+ CategoryInfo : OperationStopped: (:) [], NotSupportedException
+ FullyQualifiedErrorId : Specified method is not supported.
Any idea what could be wrong? Is there a workaround?
Comments: I don't think that AD object ACL modification is supported in remote sessions. There is no need to perform this operation in remote sessions, since you already modify ACL remotely.
Get-CertificateTemplate -Name $template | Get-CertificateTemplateAcl | Add-CertificateTemplateAcl -User $user -AccessType Allow -AccessMask $fullControl | Set-CertificateTemplateAcl
But if I ran it from a PowerShell remote session, I got error:
Specified method is not supported.
+ CategoryInfo : OperationStopped: (:) [], NotSupportedException
+ FullyQualifiedErrorId : Specified method is not supported.
Any idea what could be wrong? Is there a workaround?
Comments: I don't think that AD object ACL modification is supported in remote sessions. There is no need to perform this operation in remote sessions, since you already modify ACL remotely.