Using power-shell set/get System Identity for Azure Function App #Connect to required Azure Subscription write $subscriptionID # Set System Identity for function app Set-AzWebApp -AssignIdentity $true -Name "FuntionApp1" -ResourceGroupName "FuntionApp1" # get system Identity for function app $objectID = (Get-AzResource -Name FuntionApp1).Identity.PrincipalId write $objectID
Following powershell script can be used to loop through each service bus connections and queue to get Activate Message count and Dead Letter message count. Select-AzSubscription -Subscription "SubscriptionName" # Fetch all SB namespaces in subscription Write-Host "Getting SB Namespaces..." $sbNameSpaces = Get-AzServiceBusNamespace [ System.Collections.ArrayList ] $sbConnectionStrings = @ () Write-Host "Getting Namespace connection strings, please wait..." foreach ( $sbNameSpace in $sbNameSpaces ) { $sbResult = Get-AzServiceBusKey -ResourceGroupName $sbNameSpace .ResourceGroupName -Namespace $sbNameSpace .Name -Name RootManageSharedAccessKey [ void ] $sbConnectionStrings .Add ( $sbResult ) } # Loop all service bus connection...
Comments
Post a Comment