ps/Modules/Alkami.PowerShell.Database/Public/Import-DeveloperDynamicTenant.ps1
2023-05-30 22:51:22 -07:00

39 lines
1.0 KiB
PowerShell

function Import-DeveloperDynamicTenant {
<#
.SYNOPSIS
This function ensures the developer dynamic tenant exists on the provided connection string
.DESCRIPTION
This function ensures the developer dynamic tenant exists on the provided connection string
.PARAMETER connectionString
[string] Used to identify the connection to insert tenants to
.INPUTS
Connection string to connect to the server.
.OUTPUTS
Nothing
.EXAMPLE
Import-DeveloperDynamicTenant ConnectionString
Import-DeveloperDynamicTenant 'data source=localhost;Integrated Security=SSPI; Database=AlkamiMaster;Max Pool Size=500;Pooling=true;MultipleActiveResultSets=true;'
#>
[CmdletBinding()]
param(
[Parameter(Mandatory=$true, Position=0)]
[string]$connectionString
)
process {
if (!(Test-IsDeveloperMachine)) {
throw 'this should only be run on a developer machine'
}
$tenants = @( (Get-DeveloperTenant) );
Import-TenantsToServer $connectionString $tenants;
}
}