Upgrade Orchestrator in Azure using Powershell Script

How to upgrade Orchestrator in Azure using the Powershell Script?

To upgrade Orchestrator in Azure using the UiPath Powershell Script there are some prerequisites prior to the deployment. For such purpose please follow these instructions:

  1. Register an Application in Azure:
  • Go to Azure Active Directory > App Registrations > New Registration. Give it a name and make sure that “Single Tenant” is selected. If not selected, people from different organizations/Azure Active Directories will also have access to it. Finally, click on register:
  • Copy the Application (Client ID) of the newly created application
​​​​
  • Create a Client Secret:
Go to the previously created Application (on App registrations) > Certificates & Secrets > New Client Secret:

  • Give it a name and Select its expiration time > Click Add and copy its value:



2. Assign a role in the WebApp for the newly created application. To do that, go to WebApp > Open Access Control(IAM) > Add Role Assignment > Search for the application name of the registered app > Assign the role owner/contributor and save it:


3. Add the machine’s IP from which the upgrade will be performed. Go to SQL Server in Azure > Set Server Firewall:
  • Select add Client IP and save it:

4. Gather the information to upgrade Orchestrator in Azure:
  • Azure Application ID: To obtain it go to Azure Active Directory > App Registrations  > Application client ID
  • Azure Account Password: To obtain it go to Azure Active Directory > App Registrations  > Certificate & Secrets
  • Azure Subscription ID: Go to App Service > check the Subscription ID
  • Azure Account Tenant ID: Go to Azure Active Directory > Properties > Copy the Directory ID
  • Resource Group Name: Go to Resource Group Name in Azure or can be obtained directly from App Service > Resource Group:
  • App Service Name: 


Finally, build the Powershell command using the specs from here and upgrade Orchestrator.
The Powershell execution should look similar to this one:

./Publish-Orchestrator.ps1 -action Update -unattended -package "<path of the script>\UiPath.Orchestrator.Web.zip" -stopApplicationBeforePublish -azureSubscriptionId "<sunscriptioId>" -azureAccountTenantId "<Tenant ID copied in above steps>" -azureAccountApplicationId "<Application ID copied in above steps>" -azureAccountPassword "<Application secret key created in the above steps>" -resourceGroupName "<resource group name>" -appServiceName "<name of the WebApp>" -verbose

 
 
1 Like

It is also important to note that before running the Publish-Orchestrator.ps1 script, make sure you remove the AzureRM PowerShell module. We recommend using Az as an alternative. Having both AzureRM and Az modules installed at the same time is not supported.
For a large number of new customers using or migrating to Azure services, this enables deployment in a fraction of the time and ensures a completely predictable deployment tested and validated by UiPath infrastructure deployment specialists.