# Command Line install

I’ve got an antivirus installed on all my customer’s PCs and it has the ability to run a command line from the System account for any asset listed in my AV dashboard. I’d like to be able to install Syncro on my managed PCs using this method. I’ve played around with various ways using a call to Powershell, but it keeps failing. Using something like this is what Huntress had me use and it worked to install Huntress using the command prompt:

powershell “(New-Object Net.WebClient).DownloadFile(‘https://huntress.io/download/xyz’,"$env:temp/HuntressInstaller.exe");”%TEMP%\HuntressInstaller.exe /S /ACCT_KEY=xyz /ORG_KEY=“xxx” But when I put in Syncro pieces, it fails. powershell “(New-Object Net.WebClient).DownloadFile(‘https://rmm.syncromsp.com/dl/rs/mysyncroinformationkey’,"$env:temp/syncro-installer.exe");”%TEMP%\syncro-installer.exe --console

I’d appreciate some help. Thanks!

Do this:

powershell -command "(New-Object System.Net.WebClient).DownloadFile('YOURSYNCROURL', '%temp%/syncro.exe')";"%temp%/syncro.exe"


Also you have your ; inside your quote at the end, but it should be outside the quote.

Thank you. I ran this through an elevated command prompt to test and this was the result:

Thoughts on why this is failing? Thank you.

SSL/TLS issue. Try forcing TLS for PS/.NET

Set-ItemProperty -Path 'HKLM:\SOFTWARE\Wow6432Node\Microsoft\.NetFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -Type DWord

Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\.NetFramework\v4.0.30319' -Name 'SchUseStrongCrypto' -Value '1' -Type DWord


Yup you can do the above, or if you’re just looking for a one liner because that’s all you can run through your AV, you can modify what I gave you to be this, and this should do the trick.





Since this is a one liner, I used @mgiordano solution. Still has some errors, but fewer:

What I provided works each time I run it, that error looks like you maybe copy/pasted and it formatted it incorrectly. The single quotes look, messed up lol. I’ve seen that happen before.

Let’s break this down into a smaller piece. I just issued this single command and received this error, which is the same as the one in my previous post.

powershell -command “[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12,Tls11,Tls”

I did some googling and found that this is what I can use and it received no errors:

powershell -command “[Net.ServicePointManager]::SecurityProtocol = ‘Tls12,Tls11,Tls’”

Can anyone help with this next step? Thanks.

Sorry, bit hard to see in your screenshot, but it looks like you’ve wrapped that entire second part in ( ) which you shouldn’t need. If you look back at mine, this part specifically, the ending ) comes after you tell it where to download the file to, then end quote, then ; then quotes and call the install.

DownloadFile('YOURSYNCROURL', '%temp%/syncro.exe')";"%temp%/syncro.exe"

EDIT - Sorry I’m dumb, it wrapped and I realize now you removed the part where you’re calling the install. so ignore my bit above lol

Sorry on the road here so was looking at this on my phone. If someone doesn’t chime in before I’m back, I’ll take another look later.

I always use invoke-webrequest, but it does require PS2+ I believe, so outdated Win7 can’t do it. I used this method when we had CWC and switched to Syncro.

powershell.exe -c "Invoke-WebRequest -Uri http://server.domain.tld/path/to/file.ext -OutFile C:\path\to\save\download\file.ext"


Here is what finally worked for me. It is a single line Command Prompt that calls PowerShell to first allow the security protocol that is necessary for downloading, then download the installer and execute it.