update
This commit is contained in:
@@ -10,7 +10,7 @@ $TEMP = [System.IO.Path]::GetTempPath()
|
||||
|
||||
## Setup log file and function to write to it
|
||||
$LOGFILE = "{0}EmberkomAgentSetup_{1}.log" -f $TEMP, $(Get-Date -Format "yyyyMMddHHmmss")
|
||||
If (! (Test-Path $LOGFILE) ) { New-Item -Path $LOGFILE -ItemType File }
|
||||
If (! (Test-Path $LOGFILE) ) { New-Item -Path $LOGFILE -ItemType File | Out-Null; Write-Output "Log file: ${LOGFILE}" }
|
||||
Function Write-Log([string]$message)
|
||||
{
|
||||
$entry = "{0} : {1}" -f $(Get-Date -Format "yyyyMMddHHmmss"), $Message
|
||||
@@ -28,7 +28,7 @@ Write-Log "CUSTOMER_ID: ${CUSTOMER_ID}"
|
||||
Write-Log "SOFTWARE_ID: ${SOFTWARE_ID}"
|
||||
|
||||
## Build the path for $AGENT_INSTALLER
|
||||
$AGENT_INSTALLER = "${TEMP}\${AGENT_FILENAME}"
|
||||
$AGENT_INSTALLER = "${TEMP}${AGENT_FILENAME}"
|
||||
Write-Log "Agent installer will be saved to: ${AGENT_INSTALLER}"
|
||||
|
||||
## Make sure the CUSTOMER_ID is specified
|
||||
@@ -38,7 +38,8 @@ If ( $CUSTOMER_ID )
|
||||
If ( !(Test-Path 'HKLM:SOFTWARE\N-able Technologies\NcentralAsset') -and !(Test-Path 'SOFTWARE\Wow6432Node\N-able Technologies\NcentralAsset'))
|
||||
{
|
||||
## Build the AGENT_URL
|
||||
$AGENT_URL = "{0}{1}{2}{3}" -f 'https://manage.emberkom.com/dms/FileDownload?customerID=',$CUSTOMER_ID.ToString(),'&softwareID=',$SOFTWARE_ID.ToString()
|
||||
$AGENT_URL = 'https://manage.emberkom.com/downloadAgentOrProbeSoftwareDownloadAction.action?customerId={0}&softwareId={1}' -f $CUSTOMER_ID.ToString(),$SOFTWARE_ID.ToString()
|
||||
write-host $AGENT_URL
|
||||
|
||||
## Delete $AGENT_INSTALLER if it already exists
|
||||
If ( Test-Path $AGENT_INSTALLER )
|
||||
|
||||
Reference in New Issue
Block a user