Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,678 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi ,
While Invoking AZ Run Command from Azure Function , its getting timed out. I'm using consumption based plan. Its a HTTP Trigger . I'm running this as a Job to bypass if script get stuck for more than 120 seconds. Initially I was using Sleep parameter but that seems to put function in Sleep. Then I used For loop to avoid sleep but still loop runs for sometime & then no data
$newJob=Invoke-AzVMRunCommand -ResourceGroupName $result.ResourceGroupName -Name $result.Name -CommandId 'RunPowerShellScript' -ScriptPath $winfullPath -asjob
Invoke-WebRequest : 500 - The request timed out. 500 - The request timed out. The web server failed to respond within the specified time.
At line:27 char:17
+ $LogicAppInfo = Invoke-WebRequest -Uri $LogicAppsUrl -Headers @{
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand