modify to deploy like rmm agent
This commit is contained in:
@@ -1,4 +1,11 @@
|
|||||||
# NOTE: $URL must be set in calling script!
|
param(
|
||||||
|
[Parameter(Mandatory=$true)][string]$URL
|
||||||
|
)
|
||||||
|
|
||||||
|
# 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'))) }
|
||||||
|
. SourceTools
|
||||||
|
|
||||||
# Download the installer
|
# Download the installer
|
||||||
$INSTALLER = '{0}epi_win_live_installer.exe' -f (GetTempPath)
|
$INSTALLER = '{0}epi_win_live_installer.exe' -f (GetTempPath)
|
||||||
@@ -14,4 +21,7 @@ Catch { LogErr $_.Exception.Message }
|
|||||||
# Delete the installer
|
# Delete the installer
|
||||||
LogMsg "Deleting downloaded installer ""${INSTALLER}"""
|
LogMsg "Deleting downloaded installer ""${INSTALLER}"""
|
||||||
Try { Remove-Item -Path $INSTALLER -Force -ErrorAction SilentlyContinue }
|
Try { Remove-Item -Path $INSTALLER -Force -ErrorAction SilentlyContinue }
|
||||||
Catch { LogErr $_.Exception.Message }
|
Catch { LogErr $_.Exception.Message }
|
||||||
|
|
||||||
|
# Delete this script
|
||||||
|
Remove-Item $MyInvocation.MyCommand.Path -Force
|
||||||
|
|||||||
Reference in New Issue
Block a user