Data Collection: Generate Orchestrator Installation Logs on Azure App Service

How to get Orchestrator Installation logs from Azure App Service?

Log Generation Command

By default, running the PowerShell scripts provided by UiPath to install Orchestrator on Azure App Service (PaaS) does not generate log files, only console messages. However, these messages can also be saved to a file by appending the following command to the script:

2>&1 | Tee-Object -FilePath log.txt

2>&1 redirects standard error (stderr) to standard output (stdout), so both are captured and | Tee-Object -FilePath log.txt sends the combined output to log.txt and also displays it in the console.

Full Example:

.\Publish-Orchestrator.ps1 `
-action "Deploy" `
-unattended `
-package "E:\Work\Orch\Setup\UiPath.Orchestrator.Web.zip" `
-stopApplicationBeforePublish `
-azureSubscriptionId "$SubscriptionId" `
-azureAccountTenantId "$TenantId" `
-azureAccountApplicationId "$AzureApplicationId" `
-azureAccountPassword "$AzurePassword" `
-resourceGroupName "$RGName" `
-appServiceName "$AppserviceName" `
-testAutomationFeatureEnabled 
-updateServerFeatureEnabled 
-storageType "Azure" `
-storageLocation "DefaultEndpointsProtocol=https;AccountName=usr;AccountKey=...;EndpointSuffix=core.windows.net" `
-robotsElasticSearchUrl "http://elasticserver:9200" `
-verbose 2>&1 | Tee-Object -FilePath log.txt