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:
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.
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.
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.
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.
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.
I’ve noticed that when the forum “formatter” took my posted code, it removed some things that NEED to be there for it to work. Here is a screenshot of the Command Prompt call to PowerShell the way it should be.
For some reason, the formatter is taking the backslashes out and they NEED to be there. I see now that they were supposed to be in the original Huntress code that was OP, but the formatter removed them there as well.
@anon93541942 Thanks for the thought, but this is all a mute point, now, since the above worked and I have Syncro on all PCs. But from your example, host the file how? And what command line would you use, in an example? Remember, I don’t have remote access to these customer sites unless a customer gets me on remotely. If you are saying I should download the installer to a locally shared location and install that way, I would need to interact with a lot of customers taking a lot of time and causing a lot more interruption. Thus a one line CMD works perfectly being executed through the AV with no customer interaction.