Error Reading certificate file

This topic contains 2 replies, has 2 voices, and was last updated by Profile photo of Adam Weigert Adam Weigert 1 year, 1 month ago.

  • Author
  • #29265
    Profile photo of Adam Weigert
    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
    Profile photo of Dave Wyatt
    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
    Profile photo of Adam Weigert
    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.