I am new to powershell. Writting code in azure cloud shell.
I want to get pfx certificate information using Get-PfxCertificate command. But its not taking any path, whether its blob path or local path.
Giving error :
for Local
Get-PfxCertificate: Cannot find drive. A drive with the name ‘C’ does not exist.
for blob path
Get-PfxCertificate: Cannot find drive. A drive with the name ‘https’ does not exist.
enter image description here
Appreciated for the help.
Expecting to resolve file path issue
2
Answers
If you are trying to execute the
Get-PfxCertificate
command fromAzure CLI
butC Drive
is not available in the cloudTo resolve the issue, kindly upload the same
certificate
to Azure CLI and provide the cloud path as shown belowAfter uploading the certificate to
Azure CLI
, use thels
command to check thecertificate
and thepwd
command to verify the path.Output:
You have not included the specific command you are trying to use, however it seems to have any syntax error as it also complains about the "http" when using an URL.
Let´s say you are trying to import the filename.pfx file located in the C: folder of your Windows machine, so you would have to use one of the following commands:
Get-PfxCertificate -FilePath C:filename.pfx
or
Get-PfxCertificate -FilePath "C:filename.pfx"