1

From this question, I can get the list of all deployed functions (enabled or not) with the following script, but is there a way to know which ones are disabled?

$Params = @{
    ResourceGroupName = $ResourceGroupName
    ResourceType      = 'Microsoft.Web/sites/functions'
    ResourceName      = $AppName
    ApiVersion        = '2015-08-01'
}
Get-AzureRmResource @Params

enter image description here

1 Answer 1

2

In Azure Functions v2, functions are disabled when there's an environment variable present with name AzureWebJobs.{functionName}.Disabled and value true (see https://learn.microsoft.com/en-us/azure/azure-functions/disable-function#functions-2x---all-languages).

You can get the function app's environment variables in Azure Powershell with

(Get-AzureRmWebApp -ResourceGroupName {resourceGroupName} -Name {appName}).SiteConfig.AppSettings

and then filter accordingly.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.