Error Reading certificate file

This topic contains 2 replies, has 2 voices, and was last updated by  Adam Weigert 2 years, 9 months ago.

  • Author
  • #29265

    Adam Weigert

    Sometimes, DSC will get "upset" with the certificate I use for credential encryption for my configs. It will work for some configs and not for others, restart ISE and it starts working again. I check the path of the error and the file can be read and loaded into an X509Certificate object.

    ConvertTo-MOFInstance : System.InvalidOperationException error processing property 'Password' OF TYPE 'MSFT_Credential': Error Reading certificate file \\dscpullserver\Certificates$\NODE.cer.

    Should I not be storing my certificates on a share and keep them local to the DSC build server and my "dev" workstation?

  • #29266

    Dave Wyatt

    It would be best to have copies of the certificates stored locally on the server where you're compiling the MOFs, just to avoid those occasional networking / file sharing hiccups that you're seeing. (Ideally, these certificates would be stored in source control along with your configurations / resources, and local copies would be checked out by you or by an automated build server when the MOFs are about to be compiled.)

  • #29281

    Adam Weigert

    Thanks, I refactored the config to use a folder in the local repo via an environment variable. This seems to be working consistently so far.

You must be logged in to reply to this topic.