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 Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
2,788 questions
Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
1,531 questions
{count} votes

0 additional answers

Sort by: Most helpful