update to use atera api to get customer host url
This commit is contained in:
@@ -1,8 +1,20 @@
|
|||||||
## Path to the MSI installer
|
## Path to the MSI installer
|
||||||
$MSIURL = 'https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/resources/LiquidFiles_Admin_2.0.129.msi'
|
$MSIURL = 'https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/resources/LiquidFiles_Admin_2.0.129.msi'
|
||||||
|
|
||||||
|
Install-PSAteraModule
|
||||||
|
Import-Module -Name PSAtera
|
||||||
|
|
||||||
|
## Get LF host URL from Atera
|
||||||
|
Try {
|
||||||
|
LogMsg "Getting LiquidFiles host URL from Atera API"
|
||||||
|
Set-AteraAPIKey -APIKey $AteraAPIKey
|
||||||
|
$AteraAgent = Get-AteraAgent
|
||||||
|
$LFHost = $(Get-AteraCustomValue -ObjectType Customer -ObjectId $AteraAgent.CustomerID -FieldName 'LiquidFiles Host URL').ValueAsString
|
||||||
|
}
|
||||||
|
Catch { LogErr $_.Exception.Message }
|
||||||
|
|
||||||
## Set installer args
|
## Set installer args
|
||||||
If ( $LFHost ) {
|
If (-not [string]::IsNullOrEmpty($LFHost) ) {
|
||||||
LogMsg "LiquidFiles target server: ${LFHost}"
|
LogMsg "LiquidFiles target server: ${LFHost}"
|
||||||
$INSTALLER_ARGS = "REGKEYSCRIPT=""BaseUrl=${LFHost};"""
|
$INSTALLER_ARGS = "REGKEYSCRIPT=""BaseUrl=${LFHost};"""
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user