Active IQ Unified Manager Discussions

Problems when passing a certificate to WFA commands

kiessl
3,933 Views

Hi,

 

I need to install a certificate on a clustered Data ONTAP controller with help of WFA.

 

When I insert a certificate (pem format) in a user input field of type string and pass this input via a variable into a WFA command then "Install-NcSecurityCertificate" is throwing error "Failed to read Certificate". When I use "Install-NcSecurityCertificate" in power shell CLI then the same certificate (pem format) works fine.

 

I asume that WFA is changing the content of the string input field (especially the newline characters). But I am not sure.

 

Can anybody help me with this?

 

Thanks in advance.

 

Walter

1 ACCEPTED SOLUTION

rkiran
3,911 Views

Hi,

user input field  is usually used to provide single line of text, and it will remove end of line characters. As a workaround, you can specify the certificate file name in user input, and read the file content inside the powershell command, and then pass it to Install-NcSecurityCertificate Cmdle 

View solution in original post

3 REPLIES 3

rkiran
3,912 Views

Hi,

user input field  is usually used to provide single line of text, and it will remove end of line characters. As a workaround, you can specify the certificate file name in user input, and read the file content inside the powershell command, and then pass it to Install-NcSecurityCertificate Cmdle 

jet
3,296 Views

I am actually having this cannot read certificate error from the PowerShell CLI.  Any suggestions?  I am reading the contents of the file in to a variable.  I have tried several different ways and still no luck.

sinhaa
3,198 Views

@jet

 

I am actually having this cannot read certificate error from the PowerShell CLI.  Any suggestions?

 

-----

 

Yes, the only suggestion I can give right now is to provide your code. Otherwise its like asking help to solve  "who killed Martha" when you haven't even told what is the story.

 

You said said you have tried different ways. So provide some of those ways and we can see what mistakes were  being made.

 

 

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
Public