I am using the following code to install a .pfx file on an Azure Cloud Service:
Add-AzureCertificate -serviceName $CloudServiceName -certToDeploy $PfxFile.FullName -ErrorAction 'Stop' -Password $applicationCertsPassword
I think it's throwing an Exception because the .pfx file does not require a password.
How can I determine beforehand whether or not the .pfx file requires a password?
EDIT: I'd like to determine beforehand if the .pfx file has a password or not so I can avoid running the commandlet again without the password argument in the catch block.