# Resource Catalog Scripts

> The following table describes all the parameters that you can use with the `Publish-ResourceCatalog.ps1` script.

## Publish to Resource Catalog

The following table describes all the parameters that you can use with the `Publish-ResourceCatalog.ps1` script.

 <colgroup>
  <col/>
  <col/>
 </colgroup>
 
  
     Parameter  
     Description  
  
 
 
  
    <code>-action</code> 
    Mandatory . Indicates the type of scenario you want to start. The following options are available: 
      
         <code>Deploy</code> &ndash; specifies it is a clean installation. 
         <code>Update</code> &ndash; specifies you are updating your Resource Catalog instance. 
      

  
  
    <code>-package</code> 
    Mandatory . Indicate the full path or relative path of the <code>UiPath.ResourceCatalogService-Win64.zip</code> archive. 
  
  
    <code>-azureAccountPassword</code> 
    Mandatory. The Azure token password for the service principal ID.  
  
  
    <code>-azureSubscriptionId</code> 
    Mandatory. The Azure subscription ID for the App Service.  
  
  
    <code>-azureAccountTenantId</code> 
    Mandatory. The Azure tenant ID.  
  
  
    <code>-resourceGroupName</code> 
    Mandatory. The name of the Azure Resource Group that contains the Resource Catalog App Service.  
  
  
    <code>-appServiceName</code> 
    Mandatory. The Resource Catalog Azure App Service name.  
  
  
    <code>-noAzureAuthentication</code> 
    Optional. Allows you to publish to the Azure App Service by relying on your own user identity, without having to create a service principal. If this parameter is used, the <code>UseServicePrincipal</code> parameter set (which includes items such as the Azure application ID, password, subscription ID, and tenant ID) are no longer necessary. 
  
  
    <code>-azureUSGovernmentLogin</code> 
    Optional. This parameter is only used for US Government deployments. 
  
 

The `Publish-ResourceCatalog.ps1` script is used for the initial deployment or update of Resource Catalog. The script assumes that the web app already has the `DefaultConnection` database connection string configured.

```
.\Publish-ResourceCatalog.ps1 
-action deploy 
-package ".\UiPath.ResourceCatalogService-Win64.zip" 
-azureAccountApplicationId "<azure_application_id>" 
-azureAccountPassword "<azure_account_password>" 
-azureSubscriptionId "<subscription_id>" 
-azureAccountTenantId "<azure_tenant_id>" 
-resourceGroupName "<resourcegroup_name>" 
-appServiceName "<appservice_name>"
```

## Migrate to Resource Catalog

The following table describes all the parameters that you can use with the `MigrateTo-ResourceCatalog.ps1` script.

 <colgroup>
  <col/>
  <col/>
 </colgroup>
 
  
     Parameter  
     Description  
  
 
 
  
    <code>-cliPackage</code> 
    Mandatory . Indicate the path to the <code>UiPath.ResourceCatalogService.CLI-Win64.zip</code> archive. 
  
  
    <code>-azureDetails</code> 
     A hash table with the following values: 
      
         <code>azureAccountApplicationId</code> &ndash; Mandatory . The Azure service principal ID.. 
         <code>azureAccountPassword</code> &ndash; Mandatory . The Azure token password for the service principal ID. 
         <code>azureSubscriptionId</code> &ndash; Mandatory . The Azure subscription ID for the respective App Service. 
         <code>azureAccountTenantId</code> &ndash; Mandatory . The Azure tenant ID. 
      

  
  
    <code>-orchDetails</code> 
     A hash table with the following values: 
      
         <code>resourceGroupName</code> &ndash; Mandatory . The name of the Azure Resource Group that contains the Orchestrator App Service. 
         <code>appServiceName</code> &ndash; Mandatory . The Orchestrator App Service name. 
         <code>targetSlot</code> &ndash; Mandatory . The Target App Service Slot set by Azure. 
      

  
  
    <code>-resourceCatalogDetails</code> 
     A hash table with the following values: 
      
         <code>resourceGroupName</code> &ndash; Mandatory . The name of the Azure Resource Group that contains the Resource Catalog App Service. 
         <code>appServiceName</code> &ndash; Mandatory . The Resource Catalog App Service name. 
         <code>targetSlot</code> &ndash; Mandatory . The Target App Service Slot set by Azure. 
      

  
  
    <code>-resourceCatalogUrl</code> 
    Mandatory . The public address of the Resource Catalog.  
  
  
    <code>-identityServerUrl</code> 
    Mandatory. The URL of Identity Server.  Important: The URL must contain the Identity Server address + the suffix <code>/identity</code> . Example: <code>https://[IdentityServer]/identity</code> 
  
  
    <code>-noAzureAuthentication</code> 
    Optional. Allows you to publish to the Azure App Service by relying on your own user identity, without having to create a service principal. If this parameter is used, the <code>UseServicePrincipal</code> parameter set (which includes items such as the Azure application ID, password, subscription ID, and tenant ID) are no longer necessary. 
  
  
    <code>-orchestratorUrl</code> 
    Mandatory . The Orchestrator public URL.  
  
 

The `MigrateTo-ResourceCatalog.ps1` script is used to migrate user data from Orchestrator to Resource Catalog. It creates the database structure and add the related app settings.

The script assumes that Orchestrator and Resource Catalog are already published.

```
.\MigrateTo-ResourceCatalog.ps1 
-cliPackage ".\UiPath.ResourceCatalogService.CLI-Win64.zip" 
-azureDetails @{ azureSubscriptionId = "<subscription_id>"; azureAccountTenantId = "<azure_tenant_id>"; azureAccountApplicationId = "<azure_application_id>"; azureAccountPassword = "<azure_account_password>" } 
-orchDetails @{ resourceGroupName = "<resourcegroup_name>"; appServiceName = "<appservice_name>"; targetSlot = "Production" } 
-resourceCatalogDetails @{ resourceGroupName = "<resourcegroup_name>"; appServiceName = "<appservice_name>"; targetSlot = "Production"} 
-resourceCatalogUrl "https://<ResourceCatalogURL>" 
-identityServerUrl "https://<IdentityServerURL>/identity" -orchestratorUrl "https://<OrchestratorURL>"
```

:::note
The `MigrateTo-ResourceCatalog.ps1` script must be run when upgrading Resource Catalog Service.
:::
