# Steps for version update

### Pre-Uninstall Steps

* Take a backup of Cloud Assert billing database.
* Take a backup of the following files from their respective locations.

| File Name                                       | File Path                                                               |
| ----------------------------------------------- | ----------------------------------------------------------------------- |
| Web.config                                      | C:\inetpub\MgmtSvc-CloudAssertBilling                                   |
| License.cal                                     | C:\inetpub\MgmtSvc-CloudAssertBilling\bin                               |
| CloudAssert.WAP.Billing.AgentService.exe.config | C:\ProgramFiles\CloudAssertBilling\CloudAssert.WAP.Billing.AgentService |
| web.config                                      | C:\inetpub\AzureStack-BillingAdminExtension                             |
| web.config                                      | C:\inetpub\AzureStack-BillingTenantExtension                            |
| Web.config                                      | C:\inetpub\AzureStack-BillingRP                                         |

### Uninstallation Steps

* Uninstall existing Usage and Billing installers from Add or Remove Programs on the resource provider machine.
* Delete ‘CloudAssertBilling’ from ‘C:\Program Files’ if present after uninstalling Billing Agent Service setup.

### Installation Steps

* Extract the billing installers to a desired location
* To install the Billing API and Agent service components via command line, download the ‘setup.bat’ file [here](https://cloudassertdownloads.blob.core.windows.net/usage/setup.bat)
* Copy the initialize.ini file from the following location ‘C:\Packages\Plugins\Microsoft.Powershell.DSC\2.19.0.0\DSCWork\setupBillingConfiguration.0\AzureStack.Billing.Setup.1.0.0\content\Setup\Packages’
* Place ‘setup.bat’ and ‘initialize.ini’ (which are acquired from the above steps) files in the folder where the billing installers have been extracted.

#### Install Billing API Service

* Open a command prompt as administrator.
* Navigate to the billing installers folder.
* Run ‘setup.bat install-api’.

#### Install Billing Admin Extension

* In the command prompt, change the directory to the AdminExtension folder
* Run the command “CloudAssert.AzureStack.Billing.AdminExtension.deploy.cmd /y”

**Install Billing Tenant Extension**

* In the command prompt, change the directory to the TenantExtension folde
* Run the command “CloudAssert.AzureStack.Billing.TenantExtension.deploy.cmd /y”

#### Install Billing RP

* In the command prompt, change the directory to the RP folder
* Run the command “CloudAssert.MAS.Billing.ResourceProvider.deploy.cmd /y”

#### Install Billing Agent Service

* Refresh the admin/tenant portal and verify that Billing extension is working fine
* Open a command prompt as administrator
* Navigate to the billing installers folder
* Run ‘setup.bat install-agent’.

### &#xD;Post Installation Steps

* Download the Billing Tool [here](https://cloudassertdownloads.blob.core.windows.net/usage/MASBilling2.1.10.19/BillingTool.zip) and extract it
* Open a command prompt as administrator
* Navigate to the billing tool folder
* Run the ‘UpdateDatabase’ command in BillingTool.exe as below,

![](/files/-LnSycpDkfBB49fQjlsp)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cloudassert.com/azure-stack-billing/2007-1/installation/steps-for-version-update.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
