Add-CertificateTemplateAcl returned error when called from PowerShell remoting

Apr 17, 2014 at 7:47 PM
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?
Apr 18, 2014 at 5:46 AM
It is related to authentication delegation. You need configure remote server as trusted for delegation, or use explicit credential transfer (CredSSP).
Apr 18, 2014 at 4:09 PM
Edited Apr 18, 2014 at 4:11 PM
Actually I had remoting configured using CredSSP already; otherwise, I got different error.
When I broke down the pipeline, it worked fine for Get-CertificateTemplate and Get-CertificateTemplateAcl.
The failure happened when calling Add-CertificateTemplateAcl.

I don't think that matters, but as a fyi: the remote server is Server 2012R2, the client is Windows Blue.
Apr 18, 2014 at 4:15 PM
Edited Apr 18, 2014 at 4:16 PM
Oh, sorry, I just checked the code and found one line which I forgot to remove. Open Add-CertificateTemplateAcl.ps1 and delete the following line:
if ($Host.Name -eq "ServerRemoteHost") {throw New-Object NotSupportedException}
Apr 18, 2014 at 4:15 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.