45 lines
1.1 KiB
PowerShell
45 lines
1.1 KiB
PowerShell
<#
|
|
Module: di-db-setup
|
|
Author: Vincenzo Esposito
|
|
Modified by: -
|
|
Modification History:
|
|
- First release 04/05/2020
|
|
last updated: 04/05/2020
|
|
Intent: Setting the DBs
|
|
#>
|
|
|
|
Param(
|
|
[string] $composeLicense,
|
|
[string] $version = 'gen2'
|
|
)
|
|
|
|
Write-Host "ComposeLicenseJSON"
|
|
Write-Host $composeLicense
|
|
|
|
Set-Content $PSScriptRoot\compose-license.txt $composeLicense
|
|
|
|
# TODO set license
|
|
$bin = "C:\Program Files\Qlik\Compose\bin\"
|
|
if ( $version -eq "c4dw" ) {
|
|
$bin = "C:\Program Files\Attunity\Compose for Data Warehouses\bin\"
|
|
}
|
|
$bin = $bin -replace ' ','` '
|
|
|
|
$cmd = "$($bin)ComposeCli.exe connect"
|
|
Write-Host "Connect to Compose: $($cmd)"
|
|
$cmd = "$($bin)ComposeCli.exe connect"
|
|
Invoke-Expression $cmd
|
|
|
|
Start-Sleep 5
|
|
|
|
if ( $version -eq "2021.8.0" ) {
|
|
$cmd = "$($bin)ComposeCli.exe register_license --infile $PSScriptRoot\compose-license.txt"
|
|
} else {
|
|
$cmd = "$($bin)ComposeCli.exe register_license --req @$PSScriptRoot\compose-license.txt"
|
|
}
|
|
Write-Host "Apply Compose License: $($cmd)"
|
|
Invoke-Expression $cmd
|
|
|
|
Start-Sleep 5
|
|
|