How to Upgrade Orchestrator in Azure if AzurePublishParameters.json is missing

How to handle the scenario when the file AzurePublishParameters.json, downloaded during initial Orchestrator installation is lost?

When Orchestrator is installed in Azure for the first time a Azureparameter.jason gets downloaded. This file contains few parameters which are necessary for the upgrade. Perform the below steps when the file is lost.

Fetch those parameters individually from web.config or the application settings.

1. Go To App Services of the UiPathOrchestrator website.

2. Click Get Publish Profile

3. Move this downloaded .settings file in the script folder

4. Stop the web app

5. Open PowerShell in Admin

As the AzureParameter.jason file is not there we have to pick these values from web.config

6. In order to access web.config go to App Service editor, it will open in new Tab with all the files which are present in installation directory of Orchestrator

7. Search for the Required field

a) SessionState - mostly it will be "InProC"
b) sessionStateSqlConnectionString-- It will be server name of Database picked from Connectionstring "Server=.\"

c) Machinekeydecreption - It could be AES or Auto
d) machineKeyDecryptionKey - It could be "AutoGenerate,IsolateApps" or some value "C73CC0677BF8AC206B24F9FD07BAC67803A5CF89FFA01B086C9A938DB9022649"
e) machineKeyValidation - It could be "SHA1" or some value "HMACSHA256"

f) machineKeyValidationKey - It could be "AutoGenerate,IsolateApps" or some value "DE0D04C3B15EF628F6E8BF4F43A835DAE1EAE770BCB9AE66CBB4F71A30912212B8C1621AB9C6039E7F7E47F94FAF5FEC39D5E1276385D94482B1E2B80DDB46B4"
g) encryptionKey - It could be some value "C73CC0677BF8AC206B24F9FD07BAC67803A5CF89FFA01B086C9A938DB9022649"

There will be some values in Application settings which will be empty in web.config

a) packagesApiKey - it will be some value "adf617e9-f872-4e20-a543-2d1b8295c243"
b) ActivitiesApiey - If its empty you can generate a dummy GUID and pass it in web.config and provide the same while upgrading.

The upgrade command should look similar to this:

PS C:\uipath2018install> .\Publish-Orchestrator.ps1 -action Update -package "C:\uipath2018install\" 
-publishSettingsPath "C:\uipath2018install\uipathpoc-test.PublishSettings" 
-sessionStateMode "InProc" 
-sessionStateSqlConnectionString "Server=.\" 
-machineKeyDecryption "Auto" 
-machineKeyDecryptionKey "AutoGenerate,IsolateApps" 
-machineKeyValidation "SHA1" 
-machineKeyValidationKey "AutoGenerate,IsolateApps" 
-encryptionKey "5eN5mKJ3WKfWxfxnNATZLilSpn+yFCc0hlXqkbUQSfE=" 
-packagesApiKey "adf617e9-f872-4e20-a543-2d1b8295c243" 
-activitiesApiKey "5bd19b2c-eae9-415b-9496-1b17b52aecae"

The text file with the command and successful result from powershell is available in the attachment.