3
- task: PowerShell@2
          inputs:
            targetType: 'filepath'
            filePath: $(System.DefaultWorkingDirectory)/psscript.ps1
            arguments: >
              -ContainerName $(ContainerName
              **-Url $(Url) + '&sub-key=' + $(SubscriptionKey)**
          displayName: 'Uploading files'

-URL is not working
error | You must provide a value expression following the '+' operator.

Krzysztof Madej
  • 32,704
  • 10
  • 78
  • 107
kumar8891
  • 53
  • 1
  • 7

1 Answers1

3

Please try this:

jobs:
- job:
  variables:
    a: $[format('{0}"&"sub-key={1}', variables.Url, variables.SubscriptionKey)]
  steps:
    - task: PowerShell@2
      inputs:
        targetType: 'filepath'
        filePath: $(System.DefaultWorkingDirectory)/psscript.ps1
        arguments: >
            -ContainerName $(ContainerName)
            -Url $(a)
      displayName: 'Uploading files'

Krzysztof Madej
  • 32,704
  • 10
  • 78
  • 107