Skip to main content

REMOTE INSTALL :: Install Automox Remotely when using ConnectWise (ScreenConnect) & PowerShell

  • March 7, 2020
  • 1 reply
  • 249 views

jermicide

While attempting to implement Automox on distant systems (without an application deployment agent already on the individual systems), I was presented with a problem:



How do I get Automox installed remotely? Quickly? Quietly? And, most importantly, without having to interact with another carbon-based being??



In my case, I have ConnectWise deployed and running on distant assets. Using ConnectWise to remotely support distant systems, I have found the occasional need to incidentally run command-line using either windows CMD or PowerShell commands. Pushing Automox seemed like one of those times I should lean on this command-line resource. I have high hopes Automox Worklets will minimize dependencies on this ConnectWise command-line interface!!? 🤑🤑🤑


When using multi-line Powershell commands/scripts that take more than a few seconds to finish, consider using the below within the ConnectWise command-line interface:



#!ps

#maxlength=50000

#timeout=300000



To have the remote Windows system download, install and cleanup the installer file, paste below into ConnectWise command-line interface:



#!ps

#maxlength=50000

#timeout=300000



#Requires -Version 3.0



$installer = "https://console.automox.com/Automox_Installer-latest.msi"

$downloadobject = "c:\Automox_Installer-latest.msi"

$AutomoxKey = "<Insert Access Key Here>"



powershell -command "Invoke-WebRequest -Uri ${installer} -OutFile ${downloadobject}"

    

(Start-Process "msiexec.exe" `

-ArgumentList "/i $downloadobject /qn /norestart ACCESSKEY=$AutomoxKey" `

-NoNewWindow -Wait -PassThru).ExitCode

     

del $downloadobject



Note: The Invoke-WebRequest cmdlet was introduced in PowerShell 3.0


On Apple OS devices, to have the remote system download and install the installer file, paste below into ConnectWise command-line interface:



curl -sS https://console.automox.com/downloadInstaller?accesskey=<Insert Access Key Here>| sudo bash

launchctl load /Library/LaunchDaemons/com.automox.agent.plist



Note: As I do not know exactly how the curl switch -sS works, I am not sure how Apple handles the cleanup of this downloaded installer.


References:


https://support.automox.com/help/deploying-the-automox-agent-in-bulk




Please test any gold nugget you find using your mad google-fu skills BEFORE you fling it at your production systems. 🤪😷☠

1 reply

Nic-Automox
  • Former Automox Employee
  • 832 replies
  • March 9, 2020

This is awesome, thanks for sharing this @jermicide!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings