From 807f7e412a5b73baaa5a03861d27d33bab6fbb3e Mon Sep 17 00:00:00 2001 From: David Yoder Date: Sat, 16 Apr 2022 10:25:53 -0400 Subject: [PATCH] make sure INTEGRATOR_ID exists --- Install-AteraAgent.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Install-AteraAgent.ps1 b/Install-AteraAgent.ps1 index fb07a7c..e16f13f 100644 --- a/Install-AteraAgent.ps1 +++ b/Install-AteraAgent.ps1 @@ -1,10 +1,13 @@ param( [Parameter(Mandatory=$false)][int]$CUSTOMER_ID=1, - [Parameter(Mandatory=$false)][string]$INTEGRATOR_ID="someone@example.com", + [Parameter(Mandatory=$false)][string]$INTEGRATOR_ID, [Parameter(Mandatory=$false)][string]$AGENT_FILENAME="AteraAgentSetup.msi", [Parameter(Mandatory=$false)][switch]$FORCE ) +# Make sure $INTEGRATOR_ID exists, otherwise exit this script as an agent cannot be downloaded +If ( -not $INTEGRATOR_ID ) { Exit } + # Source the Tools.ps1 script Function SourceTools { . $([Scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://dev.emberkom.com/emberkom/management-scripts/raw/branch/master/Tools.ps1'))) }