skip to Main Content

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


  1. Get-PfxCertificate: Cannot find drive. A drive with the name ‘C’ does not exist.

    If you are trying to execute the Get-PfxCertificate command from Azure CLI but C Drive is not available in the cloud

    To resolve the issue, kindly upload the same certificate to Azure CLI and provide the cloud path as shown below

    Ex: "/home/sagnic/thhejademotest-hello-20230716.pfx"
    

    After uploading the certificate to Azure CLI, use the ls command to check the certificate and the pwd command to verify the path.

    enter image description here

    Get-PfxCertificate -FilePath "/home/sagnic/thhejademotest-hello-20230716.pfx"
    

    Output:

    enter image description here

    Login or Signup to reply.
  2. 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"

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search