Powershell script with certificate to authenticate: Access is denied.

Tomi Corigliano
Kilo Sage

Hi,

 

When I run my Powershell script on the midserver directly via Powershell, it works fine.

However, when I do it via an action and a Powershell script step I get the following error message:

 

Access is denied.

HRESULT: [-2147024891]

Stack Trace:    at System.Security.Cryptography.CryptographicException.ThrowCryptographicException(Int32 hr)
at System.Security.Cryptography.X509Certificates.X509Utils._QueryCertFileType(String fileName)
at System.Security.Cryptography.X509Certificates.X509Certificate.LoadCertificateFromFile(String fileName, Object password, X509KeyStorageFlags keyStorageFlags)
at System.Security.Cryptography.X509Certificates.X509Certificate2.Import(String fileName, String password, X509KeyStorageFlags keyStorageFlags)
at CallSite.Target(Closure , CallSite , Object , Object , Object , String )

 

0 REPLIES 0