# Remove Resource Provider

Removing a resource provider through below steps would remove the following resources that were originally created during installation,

* Admin and Tenant Resource Provider Registrations
* DNS Zone entries for the resource provider
* The admin and resource groups created for resource providers. This includes a Resource Provider Virtual machine created in the tenant resource group.

#### Steps to remove

1. Get a copy of the resource provider installation package and have it extracted.
2. Open a new elevated (administrative) PowerShell  console and change to the directory where the files have been extracted
3. Run InstallBilling.ps1 script with the parameters shown below

```
.\InstallBilling.ps1 -DefaultProviderSubscriptionId "fill-here" -ServiceAdmin "fill-here" -AdminPassword 'fill-here' -AdminArmEndpoint "fill-here" -ServiceAdminDirectoryTenantName "fill-here" -TenantSubscriptionId "fill-here" -VmLocalAdminPass 'fill-here' -PfxPassword 'fill-here' -SqlServerName "fill-here" -SqlDbName "CloudAssert.Billing" -SqlUser "cadbadmin" -SqlPass 'fill-here' -Apiuser "admin" -ApiPassword 'fill-here' -DacmDatabaseName "CloudAssert.Dacm" -Uninstall $true

E.G.:
.\InstallBilling.ps1 -DefaultProviderSubscriptionId "a088be51-b7e3-47ea-8c83-1ba98e2bbf5f" -ServiceAdmin "cloudassert@contosotest.onmicrosoft.com" -AdminPassword 'TestP@ss1234' -AdminArmEndpoint "https://adminmanagement..local.azurestack.external" -ServiceAdminDirectoryTenantName "contosotest.onmicrosoft.com" -ServiceTenant "cloudassert@contosotest.onmicrosoft.com" -TenantPassword 'TestP@ss1234' -ServiceTenantDirectoryTenantName "contosotest.onmicrosoft.com" -TenantSubscriptionId "00e4fd62-a809-4cd2-a70c-981c97ace666" -VmLocalAdminPass 'TestP@ss1234' -PfxPassword 'TestP@ss1234' -SqlServerName "192.168.102.32" -SqlDbName "CloudAssert.Billing" -SqlUser "cadbadmin" -SqlPass 'TestP@ss1234' -Apiuser "admin" -ApiPassword 'TestP@ss1234' -DacmDatabaseName "CloudAssert.Dacm" -Uninstall $true
```

![](/files/-MBh5FlFDj86-e7sT9vo)

{% hint style="info" %}
Uninstall can take 15-30 minutes to complete normally.
{% endhint %}

&#x20;   &#x20;


---

# 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/remove-billing-resource-provider.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.
