Azure Function Powershell Outputbinding to blob storage produces no output

Nick Muldrew 21 Reputation points

I Have a Azure Function written in PowerShell that is running a Query against a Database and Saving it into a object. (Yes it is getting a Result from the Query) I'm trying to Get it to Save that output as a Blob using a Output Binding. However it is not saving anything nor is it Producing any Errors from the Log Stream.

using namespace System.Net


"Hello $name!"

$ConnectionStr = 'connectionstring'
# $ConnectionStr = $env:sqldb_connection

$Query = 'SELECT *
     FROM [SalesLT].[ProductCategory]';

$testoutput = Invoke-Sqlcmd -ConnectionString $ConnectionStr -Query $Query
# $testoutput
$csvOutputTest = $testoutput | ConvertTo-Csv -NoTypeInformation
# $csvOutputTest
$testString = "Yo this is a string"
# $data = Get-Content $csvOutputTest
Write-Output outputBlob -Verbose
Write-Output "testing" -Verbose
# Out-File -FilePath $outputBlob -InputObject $csvOutputTest

Push-OutputBinding -Name resp -Value ([HttpResponseContext]@{
    StatusCode = [HttpStatusCode]::OK
    Body = "Hello"

Push-OutputBinding -Name Return -Value $csvOutputTest
# $csvOutputTest | Push-OutputBinding -name outputBlob

"bindings": [
"name": "name",
"type": "activityTrigger",
"direction": "in"
"name": "Return",
"path": "csvstorage/{rand-guid}",
"connection": "AzureWebJobsStorage",
"direction": "out",
"type": "blob"
"name": "resp",
"direction": "out",
"type": "http"

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
1,414 questions
Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
2,606 questions
{count} votes

Accepted answer
  1. Pramod Valavala 14,546 Reputation points Microsoft Employee

    Looking at the PowerShell worker code, this seems to not be supported just yet (non $return output bindings). Note that Durable Function support for PowerShell is still in preview.

    It would be best to open an issue on the PowerShell worker repo for a more insightful discussion.

    No comments

0 additional answers

Sort by: Most helpful