# Remove VConnect RP

When you are no longer using VConnect RP in an environment follow the below steps to remove it and its dependencies gracefully.

## HOST VM

1. Go to the original install location (c:\CloudAssert\VConnectMSMForAzS2002)
2. Follow steps to run InstallVConnect.ps1 at [Install VConnect RP](https://docs.cloudassert.com/azure-stack-hub-multi-stamp-management/master/installation/deployment/installation) including the parameter named  -**Uninstall $true**

```
.\InstallVConnect.ps1 -DefaultProviderSubscriptionId "" -AdminArmEndpoint "" -DirectoryTenantName "" -ServiceAdmin "" -AdminPassword '' -TenantSubscriptionId "" -VmLocalAdminPass '' -PfxPassword '' -SqlServerName "" -SqlDbName "CloudAssert.VConnect" -SqlUser "" -SqlPass '' -SetupBillingAndDacm $True -BillingApiUserName "admin" -BillingApiPassword '' -BillingDatabaseName "CloudAssert.Billing" -DacmDatabaseName "CloudAssert.Dacm" -Uninstall $true

Eg:

.\InstallVConnect.ps1 -DefaultProviderSubscriptionId "26ec7c55-594d-432f-a728-2c072b942acd" -AdminArmEndpoint "https://adminmanagement.redmond.corp.contosotest.com" -DirectoryTenantName "contosotest.onmicrosoft.com" -ServiceAdmin "cloudassert@contosotest.onmicrosoft.com" -AdminPassword 'TestPass@1234' -TenantSubscriptionId "80de4d0c-ae28-46eb-aab7-fc10aa92cebb" -VmLocalAdminPass 'TestPass@1234' -PfxPassword 'pass!!123' -SqlServerName "192.168.102.32" -SqlDbName "CloudAssert.VConnect" -SqlUser "cadbadmin" -SqlPass 'TestPass@1234' -SetupBillingAndDacm $True -BillingApiUserName "admin" -BillingApiPassword 'Number12345$' -BillingDatabaseName "CloudAssert.Billing" -DacmDatabaseName "CloudAssert.Dacm" -Uninstall $true

```

![](https://3532473591-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6voWNOkQYKxJnx1zI4%2F-M7J_xDkgWItGdYWjF0s%2F-M7Jc7W2F_hlrQwJooAU%2Fimage.png?alt=media\&token=8b49600f-2ea6-42b6-b35c-7ebeac977465)

Uninstall can take 15-30 minutes to complete normally.&#x20;

&#x20;    3\. Verify removing VConnect RP in Azure Stack Portals

* In **Admin Portal** -> **Resource Groups,** the resource group named **system. \[location].cloudassert.vconnect** should not exist.
* In **Tenant Portal** -> **Resource Groups,** the resource group named **system.\[location].cloudassert.vconnect.rp** should not exist.     &#x20;

&#x20;    4\. Go to **Admin portal** -> **Offers**, clean up any Offers that VConnect RP was tied to and are no longer used

&#x20;    5\. Go to **Admin portal** -> **Plans**, clean up any plans that VConnect RP was tied to and are no longer used

### SQL Server&#x20;

If the SQL Server was created only for VConnect RP exclusively and is no longer needed:

1. Follow steps in [Create SQL Server VM and necessary databases in a tenant subscription](https://docs.cloudassert.com/azure-stack-hub-multi-stamp-management/master/installation/prerequisites/create-sql-server-vm-in-tenant-subscription) including the parameter named  -**Uninstall $true**
2. Once deployment successfully completes, Go to **Resources** -> verify SQL Server VM is not present

If the SQL Server is being used for other purposes and need to be retained:

Remove the below called out 3 databases CloudAssert.VConnect, CloudAssert.Billing, CloudAssert.DACM that was used by VConnect RP.&#x20;

![](https://3532473591-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6voWNOkQYKxJnx1zI4%2F-M7J_xDkgWItGdYWjF0s%2F-M7Je2ls0HlR87Nn3DBi%2Fimage.png?alt=media\&token=4a28bfbf-3754-4ca0-b57f-8c7ae7778757)

&#x20;          &#x20;
