I have a powershell script in my devops repository called functionapp.ps1 located in a folder called Deploy.
I have the following code line of code in my yml file :
  - task: PowerShell@2
    inputs:
      filePath: '$(Pipeline.Workspace)/Deploy/functionapp.ps1'
When the stages are being run and it arrives to this task I get the following error:
##[error]Invalid file path 'D:\a\1\Deploy\functionapp.ps1'. A path to a .ps1 file is required.
I tried using filePath: '$(System.DefaultWorkingDirectory)/Deploy/functionapp.ps1'
I ended up having the same error. Can someone please tell me what is the issue here ?