I uploaded a .cert certificate as secure file in azure devops
we are using Classic pipelines
my pipeline added two additional tasks
1, download secure file
2, Azure Cli task to import .cert file add below script as inline script
$certFilePath = $(Agent.TempDirectory)\mycert.com.crt az keyvault certificate import --vault-name "keyvaultname" -n "mycert.com.crt" -f $certFilePath
getting the below error
D:\agent_work_temp\mycert.com.crt : The term 'D:\agent_work_temp\mycert.com.crt' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At D:\agent_work_temp\azureclitaskscript1675572660483_inlinescript.ps1:1 char:12
- $inFile = D:\agent_work_temp\mycert.com.crt
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : ObjectNotFound: (D:\agent_work_temp\mycert.com.crt:String) [], ParentContainsErrorRe cordException
- FullyQualifiedErrorId : CommandNotFoundException